File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 34
34
// macro API and catching a panic if it isn't available. Enabled on Rust
35
35
// 1.57+.
36
36
37
+ #![ allow( unknown_lints) ]
38
+ #![ allow( unexpected_cfgs) ]
39
+
37
40
use std:: env;
38
41
use std:: ffi:: OsString ;
39
42
use std:: iter;
@@ -44,6 +47,23 @@ use std::str;
44
47
fn main ( ) {
45
48
let rustc = rustc_minor_version ( ) . unwrap_or ( u32:: MAX ) ;
46
49
50
+ if rustc >= 80 {
51
+ println ! ( "cargo:rustc-check-cfg=cfg(doc_cfg)" ) ;
52
+ println ! ( "cargo:rustc-check-cfg=cfg(fuzzing)" ) ;
53
+ println ! ( "cargo:rustc-check-cfg=cfg(nightly)" ) ;
54
+ println ! ( "cargo:rustc-check-cfg=cfg(no_is_available)" ) ;
55
+ println ! ( "cargo:rustc-check-cfg=cfg(no_literal_byte_character)" ) ;
56
+ println ! ( "cargo:rustc-check-cfg=cfg(no_literal_c_string)" ) ;
57
+ println ! ( "cargo:rustc-check-cfg=cfg(no_source_text)" ) ;
58
+ println ! ( "cargo:rustc-check-cfg=cfg(proc_macro_span)" ) ;
59
+ println ! ( "cargo:rustc-check-cfg=cfg(procmacro2_backtrace)" ) ;
60
+ println ! ( "cargo:rustc-check-cfg=cfg(procmacro2_nightly_testing)" ) ;
61
+ println ! ( "cargo:rustc-check-cfg=cfg(procmacro2_semver_exempt)" ) ;
62
+ println ! ( "cargo:rustc-check-cfg=cfg(span_locations)" ) ;
63
+ println ! ( "cargo:rustc-check-cfg=cfg(super_unstable)" ) ;
64
+ println ! ( "cargo:rustc-check-cfg=cfg(wrap_proc_macro)" ) ;
65
+ }
66
+
47
67
let docs_rs = env:: var_os ( "DOCS_RS" ) . is_some ( ) ;
48
68
let semver_exempt = cfg ! ( procmacro2_semver_exempt) || docs_rs;
49
69
if semver_exempt {
You can’t perform that action at this time.
0 commit comments