diff --git a/build.rs b/build.rs index 840a742..a43d4ee 100644 --- a/build.rs +++ b/build.rs @@ -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"); } }