Add the -Zcrate-attr=foo unstable rustc option by emilyalbini · Pull Request #52355 · rust-lang/rust
bors added a commit that referenced this pull request
Jul 19, 2018Add the -Zfeature=foo unstable rustc option This PR adds a new unstable option to `rustc`: `-Zfeature=foo`. The option can be used to enable nightly features from the CLI, and it's meant to be used by tools like Crater to try enabling features without changing the crate's 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. Obviously this won't be stabilized in the future. cc rust-lang/crater#282 @Mark-Simulacrum
emilyalbini
changed the title
Add the -Zfeature=foo unstable rustc option
Add the -Zcrate-attr=foo unstable rustc option
bors added a commit that referenced this pull request
Jul 28, 2018Add 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 rust-lang/crater#282 @Mark-Simulacrum
bors
added
the
S-waiting-on-bors
label
Jul 28, 2018bors added a commit that referenced this pull request
Jul 28, 2018Add 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 rust-lang/crater#282 @Mark-Simulacrum
ojeda
mentioned this pull request
48 tasks
jieyouxu
added
-Zcrate-attr
labels
Mar 16, 2025
epage
mentioned this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters