Skip to content

Commit

Permalink
Fix unexpected_cfgs warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Juici committed May 15, 2024
1 parent 1b73c71 commit f95f409
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");

if version_check::supports_feature("proc_macro_span").unwrap_or_default() {
if version_check::is_min_version("1.80.0").unwrap_or(false) {
println!("cargo:rustc-check-cfg=cfg(doc_cfg)");
println!("cargo:rustc-check-cfg=cfg(proc_macro_span)");
}

if version_check::supports_feature("proc_macro_span").unwrap_or(false) {
println!("cargo:rustc-cfg=proc_macro_span");
}
}

0 comments on commit f95f409

Please sign in to comment.