Skip to content

Commit 451b419

Browse files
authored
Merge pull request #318 from dtolnay/checkcfg
Resolve unexpected_cfgs warning
2 parents c520af7 + 5b71485 commit 451b419

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

build.rs

+13
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,19 @@ fn main() {
1010
None => return,
1111
};
1212

13+
if compiler >= 80 {
14+
println!("cargo:rustc-check-cfg=cfg(doc_cfg)");
15+
println!("cargo:rustc-check-cfg=cfg(no_alloc_crate)");
16+
println!("cargo:rustc-check-cfg=cfg(no_const_vec_new)");
17+
println!("cargo:rustc-check-cfg=cfg(no_exhaustive_int_match)");
18+
println!("cargo:rustc-check-cfg=cfg(no_non_exhaustive)");
19+
println!("cargo:rustc-check-cfg=cfg(no_nonzero_bitscan)");
20+
println!("cargo:rustc-check-cfg=cfg(no_str_strip_prefix)");
21+
println!("cargo:rustc-check-cfg=cfg(no_track_caller)");
22+
println!("cargo:rustc-check-cfg=cfg(no_unsafe_op_in_unsafe_fn_lint)");
23+
println!("cargo:rustc-check-cfg=cfg(test_node_semver)");
24+
}
25+
1326
if compiler < 33 {
1427
// Exhaustive integer patterns. On older compilers, a final `_` arm is
1528
// required even if every possible integer value is otherwise covered.

0 commit comments

Comments
 (0)