File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -167,11 +167,19 @@ fn main() {
167167 // https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg
168168 if libc_check_cfg {
169169 for cfg in ALLOWED_CFGS {
170- println ! ( "cargo:rustc-check-cfg=values({})" , cfg) ;
170+ if rustc_minor_ver >= 75 {
171+ println ! ( "cargo:rustc-check-cfg=cfg({})" , cfg) ;
172+ } else {
173+ println ! ( "cargo:rustc-check-cfg=values({})" , cfg) ;
174+ }
171175 }
172176 for & ( name, values) in CHECK_CFG_EXTRA {
173177 let values = values. join ( "\" ,\" " ) ;
174- println ! ( "cargo:rustc-check-cfg=values({},\" {}\" )" , name, values) ;
178+ if rustc_minor_ver >= 75 {
179+ println ! ( "cargo:rustc-check-cfg=cfg({},values(\" {}\" ))" , name, values) ;
180+ } else {
181+ println ! ( "cargo:rustc-check-cfg=values({},\" {}\" )" , name, values) ;
182+ }
175183 }
176184 }
177185}
You can’t perform that action at this time.
0 commit comments