Skip to content

Commit

Permalink
Merge pull request #318 from dtolnay/checkcfg
Browse files Browse the repository at this point in the history
Resolve unexpected_cfgs warning
  • Loading branch information
dtolnay authored May 7, 2024
2 parents c520af7 + 5b71485 commit 451b419
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ fn main() {
None => return,
};

if compiler >= 80 {
println!("cargo:rustc-check-cfg=cfg(doc_cfg)");
println!("cargo:rustc-check-cfg=cfg(no_alloc_crate)");
println!("cargo:rustc-check-cfg=cfg(no_const_vec_new)");
println!("cargo:rustc-check-cfg=cfg(no_exhaustive_int_match)");
println!("cargo:rustc-check-cfg=cfg(no_non_exhaustive)");
println!("cargo:rustc-check-cfg=cfg(no_nonzero_bitscan)");
println!("cargo:rustc-check-cfg=cfg(no_str_strip_prefix)");
println!("cargo:rustc-check-cfg=cfg(no_track_caller)");
println!("cargo:rustc-check-cfg=cfg(no_unsafe_op_in_unsafe_fn_lint)");
println!("cargo:rustc-check-cfg=cfg(test_node_semver)");
}

if compiler < 33 {
// Exhaustive integer patterns. On older compilers, a final `_` arm is
// required even if every possible integer value is otherwise covered.
Expand Down

0 comments on commit 451b419

Please sign in to comment.