addresss reviews

This commit is contained in:
Lzu Tao 2024-05-20 15:06:14 +00:00
parent 73602bf408
commit c7d2f4592f
3 changed files with 10 additions and 2 deletions

View File

@ -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)',
]

View File

@ -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()))',
]

View File

@ -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),