-Z allow-features does not apply to -Z flags #139890
Labels
A-CLI
Area: Command-line interface (CLI) to the compiler
A-stability
Area: `#[stable]`, `#[unstable]` etc.
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
rustc -Z allow-features= -Z always-encode-mir
I expected to see this happen: rustc gives a hard error that
always-encode-mir
was not listed inallow-features
.Instead, this happened: rustc silently accepts the -Z flag.
It feels very natural to me that this should apply to flags, not just source code, by the same logic you'd want it anywhere: it gives the person running the build control over what unstable features they use, instead of unknowingly enabling features from the myriad sources that cargo picks up rustflags.
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: