File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
13
13
"freebsd13" ,
14
14
"freebsd14" ,
15
15
"freebsd15" ,
16
+ "libc_const_extern_fn" ,
16
17
"libc_deny_warnings" ,
17
18
"libc_ctest" ,
18
19
] ;
@@ -74,6 +75,8 @@ fn main() {
74
75
set_cfg ( "libc_deny_warnings" ) ;
75
76
}
76
77
78
+ set_cfg ( "libc_const_extern_fn" ) ;
79
+
77
80
// check-cfg is a nightly cargo/rustc feature to warn when unknown cfgs are used across the
78
81
// codebase. libc can configure it if the appropriate environment variable is passed. Since
79
82
// rust-lang/rust enforces it, this is useful when using a custom libc fork there.
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ macro_rules! e {
199
199
// cfg completely.
200
200
// FIXME(ctest): ctest can't handle `$(,)?` so we use `$(,)*` which isn't quite correct.
201
201
cfg_if ! {
202
- if #[ cfg( all ( ) ) ] {
202
+ if #[ cfg( libc_const_extern_fn ) ] {
203
203
// if #[cfg(feature = "const-extern-fn")] {
204
204
/// Define an `unsafe` function that is const as long as `const-extern-fn` is enabled.
205
205
macro_rules! f {
You can’t perform that action at this time.
0 commit comments