diff options
| author | Lzu Tao <taolzu@gmail.com> | 2024-05-20 15:06:14 +0000 |
|---|---|---|
| committer | Lzu Tao <taolzu@gmail.com> | 2024-05-21 18:17:55 +0000 |
| commit | c7d2f4592fb19a8c3d7ae5e6a1594edb4608c75f (patch) | |
| tree | a493f9c77e9e9fad8799277cd72cd2c6545eb4ea | |
| parent | 73602bf4088b31daa0da10d3ea926e1145faa5d5 (diff) | |
| download | rust-c7d2f4592fb19a8c3d7ae5e6a1594edb4608c75f.tar.gz rust-c7d2f4592fb19a8c3d7ae5e6a1594edb4608c75f.zip | |
addresss reviews
| -rw-r--r-- | library/alloc/Cargo.toml | 5 | ||||
| -rw-r--r-- | library/core/Cargo.toml | 6 | ||||
| -rw-r--r-- | src/bootstrap/src/lib.rs | 1 |
3 files changed, 10 insertions, 2 deletions
diff --git a/library/alloc/Cargo.toml b/library/alloc/Cargo.toml index cddf87a92c5..3960f716812 100644 --- a/library/alloc/Cargo.toml +++ b/library/alloc/Cargo.toml @@ -43,9 +43,12 @@ optimize_for_size = ["core/optimize_for_size"] [lints.rust.unexpected_cfgs] level = "warn" +# x.py uses beta cargo, so `check-cfg` entries do not yet take effect +# for rust-lang/rust. But for users of `-Zbuild-std` it does. +# The unused warning is waiting for rust-lang/cargo#13925 to reach beta. check-cfg = [ - 'cfg(no_global_oom_handling)', 'cfg(bootstrap)', + 'cfg(no_global_oom_handling)', 'cfg(no_rc)', 'cfg(no_sync)', ] diff --git a/library/core/Cargo.toml b/library/core/Cargo.toml index 0c86f430f32..756f68e6048 100644 --- a/library/core/Cargo.toml +++ b/library/core/Cargo.toml @@ -39,9 +39,13 @@ debug_refcell = [] [lints.rust.unexpected_cfgs] level = "warn" +# x.py uses beta cargo, so `check-cfg` entries do not yet take effect +# for rust-lang/rust. But for users of `-Zbuild-std` it does. +# The unused warning is waiting for rust-lang/cargo#13925 to reach beta. check-cfg = [ 'cfg(no_fp_fmt_parse)', 'cfg(bootstrap)', 'cfg(stdarch_intel_sde)', - 'cfg(feature, values("all_lane_counts"))', + # This matches `EXTRA_CHECK_CFGS` in `src/bootstrap/src/lib.rs`. + 'cfg(feature, values(any()))', ] diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index 698a576effa..0578638de5c 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -84,6 +84,7 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &str, Option<&[&'static str]>)] = &[ (Some(Mode::ToolRustc), "rust_analyzer", None), (Some(Mode::ToolStd), "rust_analyzer", None), (Some(Mode::Codegen), "parallel_compiler", None), + // NOTE: consider updating `check-cfg` entries in `std/Cargo.toml` too. (Some(Mode::Std), "stdarch_intel_sde", None), (Some(Mode::Std), "no_fp_fmt_parse", None), (Some(Mode::Std), "no_global_oom_handling", None), |
