@@ -14,8 +14,6 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
1414 "freebsd13" ,
1515 "freebsd14" ,
1616 "freebsd15" ,
17- "libc_const_extern_fn" ,
18- "libc_const_extern_fn_unstable" ,
1917 "libc_deny_warnings" ,
2018 "libc_long_array" ,
2119 "libc_thread_local" ,
@@ -42,9 +40,8 @@ fn main() {
4240 // Avoid unnecessary re-building.
4341 println ! ( "cargo:rerun-if-changed=build.rs" ) ;
4442
45- let ( rustc_minor_ver, is_nightly ) = rustc_minor_nightly ( ) ;
43+ let ( rustc_minor_ver, _is_nightly ) = rustc_minor_nightly ( ) ;
4644 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 ( ) ;
4845 let libc_ci = env:: var ( "LIBC_CI" ) . is_ok ( ) ;
4946 let libc_check_cfg = env:: var ( "LIBC_CHECK_CFG" ) . is_ok ( ) || rustc_minor_ver >= 80 ;
5047
@@ -96,20 +93,6 @@ fn main() {
9693 set_cfg ( "libc_thread_local" ) ;
9794 }
9895
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-
11396 // check-cfg is a nightly cargo/rustc feature to warn when unknown cfgs are used across the
11497 // codebase. libc can configure it if the appropriate environment variable is passed. Since
11598 // rust-lang/rust enforces it, this is useful when using a custom libc fork there.
0 commit comments