summaryrefslogtreecommitdiffstats
path: root/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/build.rs b/build.rs
index 656c569..0a95c22 100644
--- a/build.rs
+++ b/build.rs
@@ -34,6 +34,9 @@
// macro API and catching a panic if it isn't available. Enabled on Rust
// 1.57+.
+#![allow(unknown_lints)]
+#![allow(unexpected_cfgs)]
+
use std::env;
use std::ffi::OsString;
use std::iter;
@@ -44,6 +47,22 @@ use std::str;
fn main() {
let rustc = rustc_minor_version().unwrap_or(u32::MAX);
+ if rustc >= 80 {
+ println!("cargo:rustc-check-cfg=cfg(fuzzing)");
+ println!("cargo:rustc-check-cfg=cfg(no_is_available)");
+ println!("cargo:rustc-check-cfg=cfg(no_literal_byte_character)");
+ println!("cargo:rustc-check-cfg=cfg(no_literal_c_string)");
+ println!("cargo:rustc-check-cfg=cfg(no_source_text)");
+ println!("cargo:rustc-check-cfg=cfg(proc_macro_span)");
+ println!("cargo:rustc-check-cfg=cfg(procmacro2_backtrace)");
+ println!("cargo:rustc-check-cfg=cfg(procmacro2_nightly_testing)");
+ println!("cargo:rustc-check-cfg=cfg(procmacro2_semver_exempt)");
+ println!("cargo:rustc-check-cfg=cfg(randomize_layout)");
+ println!("cargo:rustc-check-cfg=cfg(span_locations)");
+ println!("cargo:rustc-check-cfg=cfg(super_unstable)");
+ println!("cargo:rustc-check-cfg=cfg(wrap_proc_macro)");
+ }
+
let docs_rs = env::var_os("DOCS_RS").is_some();
let semver_exempt = cfg!(procmacro2_semver_exempt) || docs_rs;
if semver_exempt {