File tree 2 files changed +3
-20
lines changed
2 files changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -203,19 +203,6 @@ jobs:
203
203
export PATH=$HOME/.rust_solaris/bin:$PATH
204
204
./ci/run.sh ${{ matrix.target }}
205
205
206
- check_cfg :
207
- name : " Check #[cfg]s"
208
- runs-on : ubuntu-24.04
209
- env :
210
- TOOLCHAIN : nightly
211
- timeout-minutes : 10
212
- steps :
213
- - uses : actions/checkout@v4
214
- - name : Setup Rust toolchain
215
- run : ./ci/install-rust.sh
216
- - name : Build with check-cfg
217
- run : LIBC_CHECK_CFG=1 cargo build -Z unstable-options -Z check-cfg
218
-
219
206
# One job that "summarizes" the success state of this pipeline. This can then be added to branch
220
207
# protection, rather than having to add each job separately.
221
208
success :
Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ fn main() {
43
43
let ( rustc_minor_ver, _is_nightly) = rustc_minor_nightly ( ) ;
44
44
let rustc_dep_of_std = env:: var ( "CARGO_FEATURE_RUSTC_DEP_OF_STD" ) . is_ok ( ) ;
45
45
let libc_ci = env:: var ( "LIBC_CI" ) . is_ok ( ) ;
46
- let libc_check_cfg = env:: var ( "LIBC_CHECK_CFG" ) . is_ok ( ) || rustc_minor_ver >= 80 ;
47
46
48
47
// The ABI of libc used by std is backward compatible with FreeBSD 12.
49
48
// The ABI of libc from crates.io is backward compatible with FreeBSD 12.
@@ -94,12 +93,9 @@ fn main() {
94
93
// Set unconditionally when ctest is not being invoked.
95
94
set_cfg ( "libc_const_extern_fn" ) ;
96
95
97
- // check-cfg is a nightly cargo/rustc feature to warn when unknown cfgs are used across the
98
- // codebase. libc can configure it if the appropriate environment variable is passed. Since
99
- // rust-lang/rust enforces it, this is useful when using a custom libc fork there.
100
- //
101
- // https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg
102
- if libc_check_cfg {
96
+ // Since Rust 1.80, configuration that isn't recognized by default needs to be provided to
97
+ // avoid warnings.
98
+ if rustc_minor_ver >= 80 {
103
99
for cfg in ALLOWED_CFGS {
104
100
if rustc_minor_ver >= 75 {
105
101
println ! ( "cargo:rustc-check-cfg=cfg({})" , cfg) ;
You can’t perform that action at this time.
0 commit comments