File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -40,3 +40,15 @@ compiler-builtins-weak-intrinsics = ["compiler_builtins/weak-intrinsics"]
4040panic_immediate_abort = [" core/panic_immediate_abort" ]
4141# Choose algorithms that are optimized for binary size instead of runtime performance
4242optimize_for_size = [" core/optimize_for_size" ]
43+
44+ [lints .rust .unexpected_cfgs ]
45+ 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.
49+ check-cfg = [
50+ ' cfg(bootstrap)' ,
51+ ' cfg(no_global_oom_handling)' ,
52+ ' cfg(no_rc)' ,
53+ ' cfg(no_sync)' ,
54+ ]
Original file line number Diff line number Diff line change @@ -36,3 +36,16 @@ optimize_for_size = []
3636# Make `RefCell` store additional debugging information, which is printed out when
3737# a borrow error occurs
3838debug_refcell = []
39+
40+ [lints .rust .unexpected_cfgs ]
41+ 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.
45+ check-cfg = [
46+ ' cfg(bootstrap)' ,
47+ ' cfg(no_fp_fmt_parse)' ,
48+ ' cfg(stdarch_intel_sde)' ,
49+ # This matches `EXTRA_CHECK_CFGS` in `src/bootstrap/src/lib.rs`.
50+ ' cfg(feature, values(any()))' ,
51+ ]
Original file line number Diff line number Diff line change @@ -97,3 +97,13 @@ heap_size = 0x8000000
9797name = " stdbenches"
9898path = " benches/lib.rs"
9999test = true
100+
101+ [lints .rust .unexpected_cfgs ]
102+ level = " warn"
103+ check-cfg = [
104+ ' cfg(bootstrap)' ,
105+ ' cfg(backtrace_in_libstd)' ,
106+ ' cfg(netbsd10)' ,
107+ ' cfg(target_arch, values("xtensa"))' ,
108+ ' cfg(feature, values("std", "as_crate"))' ,
109+ ]
You can’t perform that action at this time.
0 commit comments