6323d9a45b
Add the -Zcrate-attr=foo unstable rustc option This PR adds a new unstable option to `rustc`: `-Zcrate-attr=foo`. The option can be used to inject crate-level attributes from the CLI, and it's meant to be used by tools like Crater that needs to add their own attributes to a crate without changing the source code. The exact reason I need this is to implement "edition runs" in Crater: we need to add the preview feature flag to every crate, and editing the crates' source code on the fly might produce unexpected results, while a compiler flag is more reliable. cc https://github.com/rust-lang-nursery/crater/issues/282 @Mark-Simulacrum |
||
---|---|---|
.. | ||
attr | ||
diagnostics | ||
ext | ||
parse | ||
util | ||
Cargo.toml | ||
README.md | ||
ast.rs | ||
build.rs | ||
codemap.rs | ||
config.rs | ||
diagnostic_list.rs | ||
early_buffered_lints.rs | ||
entry.rs | ||
feature_gate.rs | ||
fold.rs | ||
json.rs | ||
lib.rs | ||
ptr.rs | ||
show_span.rs | ||
std_inject.rs | ||
str.rs | ||
test.rs | ||
test_snippet.rs | ||
tokenstream.rs | ||
visit.rs |
README.md
The syntax
crate contains those things concerned purely with syntax
– that is, the AST ("abstract syntax tree"), parser, pretty-printer,
lexer, macro expander, and utilities for traversing ASTs.
For more information about how these things work in rustc, see the rustc guide: