File tree 3 files changed +7
-6
lines changed
3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -135,14 +135,10 @@ cargo-args = ["-Zbuild-std=core"]
135
135
rustc-std-workspace-core = { version = " 1.0.0" , optional = true }
136
136
137
137
[features ]
138
- default = [" const-extern-fn " , " std" ]
138
+ default = [" std" ]
139
139
std = []
140
140
rustc-dep-of-std = [" rustc-std-workspace-core" ]
141
141
extra_traits = []
142
142
143
- # `const-extern-function` is deprecated and no longer does anything
144
- # FIXME(1.0): remove this completely
145
- const-extern-fn = []
146
-
147
143
[workspace ]
148
144
members = [" libc-test" ]
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
13
13
"freebsd13" ,
14
14
"freebsd14" ,
15
15
"freebsd15" ,
16
+ // FIXME(ctest): this config shouldn't be needed but ctest can't parse `const extern fn`
17
+ "libc_const_extern_fn" ,
16
18
"libc_deny_warnings" ,
17
19
"libc_ctest" ,
18
20
] ;
@@ -74,6 +76,8 @@ fn main() {
74
76
set_cfg ( "libc_deny_warnings" ) ;
75
77
}
76
78
79
+ set_cfg ( "libc_const_extern_fn" ) ;
80
+
77
81
// check-cfg is a nightly cargo/rustc feature to warn when unknown cfgs are used across the
78
82
// codebase. libc can configure it if the appropriate environment variable is passed. Since
79
83
// 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,8 @@ 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( feature = "const-extern-fn" ) ] {
202
+ if #[ cfg( libc_const_extern_fn) ] {
203
+ // if #[cfg(feature = "const-extern-fn")] {
203
204
/// Define an `unsafe` function that is const as long as `const-extern-fn` is enabled.
204
205
macro_rules! f {
205
206
( $(
You can’t perform that action at this time.
0 commit comments