You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bootstrap: Build compiler crates that ought to compile on stable without RUSTC_BOOTSTRAP=1 #117937
There exist some compiler crates (e.g., rustc_lexer and rustc_parse_format) which ought not use unstable features since they are used by other tools like rust-analyzer which has a “no nightly” policy. The aforementioned crates do contain comments informing rustc devs about it, they are easy to miss however.
If bootstrap were to compile those crates without RUSTC_BOOTSTRAP=1, the issue of PRs accidentally adding #![feature]s to such crates could be prevented in the future.
Alternative: A rustc-internal or regular lint triggering on #![feature]s.
And we have -Zallow-feature to explicitly list the set of allowed unstable features. Could be set in the rustc wrapper of bootstrap depending on the crate name.
Activity
lukas-code commentedon Nov 15, 2023
FWIW, there is already the
unstable_featureslint. The docs say it's deprecated, but is appears to work perfectly fine.bjorn3 commentedon Nov 15, 2023
And we have
-Zallow-featureto explicitly list the set of allowed unstable features. Could be set in the rustc wrapper of bootstrap depending on the crate name.clubby789 commentedon Nov 15, 2023
Seems like this note was added in #26417, when use of unstable features was turned into a compiler error rather than a lint
fmease commentedon Nov 15, 2023
Okay, I guess I'm gonna submit a t-lang-nominated PR later undeprecating
unstable_featuresand applying it to the two affected crates.Rollup merge of rust-lang#118639 - fmease:deny-features-in-stable-rus…
Rollup merge of rust-lang#118639 - fmease:deny-features-in-stable-rus…
Rollup merge of rust-lang#118639 - fmease:deny-features-in-stable-rus…
Rollup merge of rust-lang#118639 - fmease:deny-features-in-stable-rus…
Unrolled build for rust-lang#118639