summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 13:40:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 13:40:32 +0000
commitf6f9019780e4eba16ec150d85ac91ecea41618e8 (patch)
treebac885a3c92c4c772ac1bd64be47dd12d021adb0 /build
parentAdding debian version 1.0.81-1. (diff)
downloadrust-proc-macro2-f6f9019780e4eba16ec150d85ac91ecea41618e8.tar.xz
rust-proc-macro2-f6f9019780e4eba16ec150d85ac91ecea41618e8.zip
Merging upstream version 1.0.85.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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 {