Skip to content

Commit 1791205

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

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.github/workflows/CI.yml

+17
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
- features
2424
- ffi
2525
- ffi-header
26+
- unexpected-cfgs
2627
- doc
2728
- check-external-types
2829
- udeps
@@ -220,6 +221,22 @@ jobs:
220221
- name: Ensure that hyper.h is up to date
221222
run: ./capi/gen_header.sh --verify
222223

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

src/lib.rs

+1-1
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)