-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Remove bootstrap cfgs from library/ #141925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
rustbot has assigned @workingjubilee. Use |
Can we stop allowing cfg(bootstrap) for check-cfg in the standard library? |
Good idea -- I've removed a few more places, including those explicit |
This comment has been minimized.
This comment has been minimized.
8e99f2b
to
c87b072
Compare
allowing |
Thanks! @bors r+ rollup |
…kingjubilee Remove bootstrap cfgs from library/ These `cfg(bootstrap)` are always false now that rust-lang#119899 has landed, and likewise `cfg(not(bootstrap))` is always true. Therefore, we don't need to wait for the usual stage0 bump to clean these up.
…kingjubilee Remove bootstrap cfgs from library/ These `cfg(bootstrap)` are always false now that rust-lang#119899 has landed, and likewise `cfg(not(bootstrap))` is always true. Therefore, we don't need to wait for the usual stage0 bump to clean these up.
Rollup of 8 pull requests Successful merges: - #137725 (Add `iter` macro) - #141455 (std: abort the process on failure to allocate a TLS key) - #141569 (Replace ad-hoc ABI "adjustments" with an `AbiMap` to `CanonAbi`) - #141698 (Use the informative error as the main const eval error message) - #141925 (Remove bootstrap cfgs from library/) - #141943 (Remove pre-expansion AST stats.) - #141945 (Remove `Path::is_ident`.) - #141957 (Add missing `dyn` keywords to tests that do not test for them Part 2) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #141925 - cuviper:vestigial-bootstrap, r=workingjubilee Remove bootstrap cfgs from library/ These `cfg(bootstrap)` are always false now that #119899 has landed, and likewise `cfg(not(bootstrap))` is always true. Therefore, we don't need to wait for the usual stage0 bump to clean these up.
Rollup of 8 pull requests Successful merges: - rust-lang/rust#137725 (Add `iter` macro) - rust-lang/rust#141455 (std: abort the process on failure to allocate a TLS key) - rust-lang/rust#141569 (Replace ad-hoc ABI "adjustments" with an `AbiMap` to `CanonAbi`) - rust-lang/rust#141698 (Use the informative error as the main const eval error message) - rust-lang/rust#141925 (Remove bootstrap cfgs from library/) - rust-lang/rust#141943 (Remove pre-expansion AST stats.) - rust-lang/rust#141945 (Remove `Path::is_ident`.) - rust-lang/rust#141957 (Add missing `dyn` keywords to tests that do not test for them Part 2) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - rust-lang/rust#137725 (Add `iter` macro) - rust-lang/rust#141455 (std: abort the process on failure to allocate a TLS key) - rust-lang/rust#141569 (Replace ad-hoc ABI "adjustments" with an `AbiMap` to `CanonAbi`) - rust-lang/rust#141698 (Use the informative error as the main const eval error message) - rust-lang/rust#141925 (Remove bootstrap cfgs from library/) - rust-lang/rust#141943 (Remove pre-expansion AST stats.) - rust-lang/rust#141945 (Remove `Path::is_ident`.) - rust-lang/rust#141957 (Add missing `dyn` keywords to tests that do not test for them Part 2) r? `@ghost` `@rustbot` modify labels: rollup
@@ -29,7 +29,6 @@ debug_typeid = [] | |||
[lints.rust.unexpected_cfgs] | |||
level = "warn" | |||
check-cfg = [ | |||
'cfg(bootstrap)', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Despite this removal, cfg(bootstrap) gets accepted in libcore apparently. However, it now gets rejected for out-of-tree builds, such as https://github.com/rust-lang/miri-test-libstd/. That's bad since it means we'll land changes that then fail to build elsewhere.
I think either the cfg(bootstrap) here should be added back, or our CI needs to ensure that there truly isn't any cfg(bootstrap) in libcore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's troublesome. Sorry, I didn't realize that would happen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's probably because bootstrap is still adding the cfg manually to all crates.
Lines 80 to 84 in d00435f
/// Extra `--check-cfg` to add when building the compiler or tools | |
/// (Mode restriction, config name, config values (if any)) | |
#[expect(clippy::type_complexity)] // It's fine for hard-coded list and type is explained above. | |
const EXTRA_CHECK_CFGS: &[(Option<Mode>, &str, Option<&[&'static str]>)] = &[ | |
(None, "bootstrap", None), |
These
cfg(bootstrap)
are always false now that #119899 has landed, and likewisecfg(not(bootstrap))
is always true. Therefore, we don't need to wait for the usual stage0 bump to clean these up.