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