Skip to content

Commit c73e32b

Browse files
committed
addresss reviews
1 parent eead843 commit c73e32b

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

library/alloc/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,12 @@ panic_immediate_abort = []
4141

4242
[lints.rust.unexpected_cfgs]
4343
level = "warn"
44+
# x.py uses beta cargo, so `check-cfg` entries do not yet take effect
45+
# for rust-lang/rust. But for users of `-Zbuild-std` it does.
46+
# The unused warning is waiting for rust-lang/cargo#13925 to reach beta.
4447
check-cfg = [
45-
'cfg(no_global_oom_handling)',
4648
'cfg(bootstrap)',
49+
'cfg(no_global_oom_handling)',
4750
'cfg(no_rc)',
4851
'cfg(no_sync)',
4952
]

library/core/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,13 @@ debug_refcell = []
3737

3838
[lints.rust.unexpected_cfgs]
3939
level = "warn"
40+
# x.py uses beta cargo, so `check-cfg` entries do not yet take effect
41+
# for rust-lang/rust. But for users of `-Zbuild-std` it does.
42+
# The unused warning is waiting for rust-lang/cargo#13925 to reach beta.
4043
check-cfg = [
4144
'cfg(no_fp_fmt_parse)',
4245
'cfg(bootstrap)',
4346
'cfg(stdarch_intel_sde)',
44-
'cfg(feature, values("all_lane_counts"))',
47+
# This matches `EXTRA_CHECK_CFGS` in `src/bootstrap/src/lib.rs`.
48+
'cfg(feature, values(any()))',
4549
]

library/std/Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ system-llvm-libunwind = ["unwind/system-llvm-libunwind"]
8282

8383
# Make panics and failed asserts immediately abort without formatting any message
8484
panic_immediate_abort = ["core/panic_immediate_abort", "alloc/panic_immediate_abort"]
85-
restricted-std = []
8685

8786
# Enable std_detect default features for stdarch/crates/std_detect:
8887
# https://github.com/rust-lang/stdarch/blob/master/crates/std_detect/Cargo.toml
@@ -103,10 +102,14 @@ test = true
103102

104103
[lints.rust.unexpected_cfgs]
105104
level = "warn"
105+
# x.py uses beta cargo, so `check-cfg` entries do not yet take effect
106+
# for rust-lang/rust. But for users of `-Zbuild-std` it does.
107+
# The unused warning is waiting for rust-lang/cargo#13925 to reach beta.
106108
check-cfg = [
107109
'cfg(bootstrap)',
108110
'cfg(backtrace_in_libstd)',
109111
'cfg(netbsd10)',
110112
'cfg(target_arch, values("xtensa"))',
111-
'cfg(feature, values("std", "as_crate"))',
113+
# This matches `EXTRA_CHECK_CFGS` in `src/bootstrap/src/lib.rs`.
114+
'cfg(feature, values(any()))',
112115
]

src/bootstrap/src/lib.rs

Lines changed: 1 addition & 0 deletions
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)