File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
Expand file tree Collapse file tree 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"]
135135rustc-std-workspace-core = { version = " 1.0.0" , optional = true }
136136
137137[features ]
138- default = [" const-extern-fn " , " std" ]
138+ default = [" std" ]
139139std = []
140140rustc-dep-of-std = [" rustc-std-workspace-core" ]
141141extra_traits = []
142142
143- # `const-extern-function` is deprecated and no longer does anything
144- # FIXME(1.0): remove this completely
145- const-extern-fn = []
146-
147143[workspace ]
148144members = [" libc-test" ]
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
1313 "freebsd13" ,
1414 "freebsd14" ,
1515 "freebsd15" ,
16+ // FIXME(ctest): this config shouldn't be needed but ctest can't parse `const extern fn`
17+ "libc_const_extern_fn" ,
1618 "libc_deny_warnings" ,
1719 "libc_ctest" ,
1820] ;
@@ -74,6 +76,8 @@ fn main() {
7476 set_cfg ( "libc_deny_warnings" ) ;
7577 }
7678
79+ set_cfg ( "libc_const_extern_fn" ) ;
80+
7781 // check-cfg is a nightly cargo/rustc feature to warn when unknown cfgs are used across the
7882 // codebase. libc can configure it if the appropriate environment variable is passed. Since
7983 // 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 {
199199// cfg completely.
200200// FIXME(ctest): ctest can't handle `$(,)?` so we use `$(,)*` which isn't quite correct.
201201cfg_if ! {
202- if #[ cfg( feature = "const-extern-fn" ) ] {
202+ if #[ cfg( libc_const_extern_fn) ] {
203+ // if #[cfg(feature = "const-extern-fn")] {
203204 /// Define an `unsafe` function that is const as long as `const-extern-fn` is enabled.
204205 macro_rules! f {
205206 ( $(
You can’t perform that action at this time.
0 commit comments