Skip to content

Commit 2899574

Browse files
committed
chore: fix unexpected cfg warning
1 parent 9f8167f commit 2899574

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.github/workflows/CI.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,22 @@ jobs:
220220
- name: Ensure that hyper.h is up to date
221221
run: ./capi/gen_header.sh --verify
222222

223+
unexpected-cfgs:
224+
runs-on: ubuntu-latest
225+
needs: [style]
226+
steps:
227+
- uses: actions/checkout@v4
228+
- uses: dtolnay/rust-toolchain@nightly
229+
- uses: Swatinem/rust-cache@v2
230+
- run: cargo check --all-features
231+
env:
232+
RUSTFLAGS: |
233+
-D unexpected_cfgs
234+
--cfg check_unexpected_cfgs
235+
--cfg hyper_unstable_tracing
236+
--cfg hyper_unstable_ffi
237+
--check-cfg=cfg(check_unexpected_cfgs,hyper_unstable_tracing,hyper_unstable_ffi)
238+
223239
doc:
224240
name: Build docs
225241
needs: [style, test]

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![deny(missing_docs)]
22
#![deny(missing_debug_implementations)]
3-
#![allow(unexpected_cfgs)]
3+
#![cfg_attr(not(check_unexpected_cfgs), allow(unexpected_cfgs))]
44
#![cfg_attr(test, deny(rust_2018_idioms))]
55
#![cfg_attr(all(test, feature = "full"), deny(unreachable_pub))]
66
#![cfg_attr(all(test, feature = "full"), deny(warnings))]

0 commit comments

Comments
 (0)