Skip to content

Commit c7d2f45

Browse files
committed
addresss reviews
1 parent 73602bf commit c7d2f45

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

library/alloc/Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,12 @@ optimize_for_size = ["core/optimize_for_size"]
4343

4444
[lints.rust.unexpected_cfgs]
4545
level = "warn"
46+
# x.py uses beta cargo, so `check-cfg` entries do not yet take effect
47+
# for rust-lang/rust. But for users of `-Zbuild-std` it does.
48+
# The unused warning is waiting for rust-lang/cargo#13925 to reach beta.
4649
check-cfg = [
47-
'cfg(no_global_oom_handling)',
4850
'cfg(bootstrap)',
51+
'cfg(no_global_oom_handling)',
4952
'cfg(no_rc)',
5053
'cfg(no_sync)',
5154
]

library/core/Cargo.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,13 @@ debug_refcell = []
3939

4040
[lints.rust.unexpected_cfgs]
4141
level = "warn"
42+
# x.py uses beta cargo, so `check-cfg` entries do not yet take effect
43+
# for rust-lang/rust. But for users of `-Zbuild-std` it does.
44+
# The unused warning is waiting for rust-lang/cargo#13925 to reach beta.
4245
check-cfg = [
4346
'cfg(no_fp_fmt_parse)',
4447
'cfg(bootstrap)',
4548
'cfg(stdarch_intel_sde)',
46-
'cfg(feature, values("all_lane_counts"))',
49+
# This matches `EXTRA_CHECK_CFGS` in `src/bootstrap/src/lib.rs`.
50+
'cfg(feature, values(any()))',
4751
]

src/bootstrap/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &str, Option<&[&'static str]>)] = &[
8484
(Some(Mode::ToolRustc), "rust_analyzer", None),
8585
(Some(Mode::ToolStd), "rust_analyzer", None),
8686
(Some(Mode::Codegen), "parallel_compiler", None),
87+
// NOTE: consider updating `check-cfg` entries in `std/Cargo.toml` too.
8788
(Some(Mode::Std), "stdarch_intel_sde", None),
8889
(Some(Mode::Std), "no_fp_fmt_parse", None),
8990
(Some(Mode::Std), "no_global_oom_handling", None),

0 commit comments

Comments
 (0)