@@ -14,8 +14,6 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
14
14
"freebsd13" ,
15
15
"freebsd14" ,
16
16
"freebsd15" ,
17
- "libc_const_extern_fn" ,
18
- "libc_const_extern_fn_unstable" ,
19
17
"libc_deny_warnings" ,
20
18
"libc_long_array" ,
21
19
"libc_thread_local" ,
@@ -42,9 +40,8 @@ fn main() {
42
40
// Avoid unnecessary re-building.
43
41
println ! ( "cargo:rerun-if-changed=build.rs" ) ;
44
42
45
- let ( rustc_minor_ver, is_nightly ) = rustc_minor_nightly ( ) ;
43
+ let ( rustc_minor_ver, _is_nightly ) = rustc_minor_nightly ( ) ;
46
44
let rustc_dep_of_std = env:: var ( "CARGO_FEATURE_RUSTC_DEP_OF_STD" ) . is_ok ( ) ;
47
- let const_extern_fn_cargo_feature = env:: var ( "CARGO_FEATURE_CONST_EXTERN_FN" ) . is_ok ( ) ;
48
45
let libc_ci = env:: var ( "LIBC_CI" ) . is_ok ( ) ;
49
46
let libc_check_cfg = env:: var ( "LIBC_CHECK_CFG" ) . is_ok ( ) || rustc_minor_ver >= 80 ;
50
47
@@ -96,20 +93,6 @@ fn main() {
96
93
set_cfg ( "libc_thread_local" ) ;
97
94
}
98
95
99
- // Rust >= 1.62.0 allows to use `const_extern_fn` for "Rust" and "C".
100
- if rustc_minor_ver >= 62 {
101
- set_cfg ( "libc_const_extern_fn" ) ;
102
- } else {
103
- // Rust < 1.62.0 requires a crate feature and feature gate.
104
- if const_extern_fn_cargo_feature {
105
- if !is_nightly || rustc_minor_ver < 40 {
106
- panic ! ( "const-extern-fn requires a nightly compiler >= 1.40" ) ;
107
- }
108
- set_cfg ( "libc_const_extern_fn_unstable" ) ;
109
- set_cfg ( "libc_const_extern_fn" ) ;
110
- }
111
- }
112
-
113
96
// check-cfg is a nightly cargo/rustc feature to warn when unknown cfgs are used across the
114
97
// codebase. libc can configure it if the appropriate environment variable is passed. Since
115
98
// rust-lang/rust enforces it, this is useful when using a custom libc fork there.
0 commit comments