Skip to content

Commit ecb0095

Browse files
authored
chore(lib): fix unexpected cfg warning (#777)
1 parent 092f3b3 commit ecb0095

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.github/workflows/CI.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,20 @@ jobs:
6161
run: ./ci/h2spec.sh
6262
if: matrix.rust == 'stable'
6363

64+
unexpected-cfgs:
65+
runs-on: ubuntu-latest
66+
needs: [style]
67+
steps:
68+
- uses: actions/checkout@v4
69+
- uses: dtolnay/rust-toolchain@nightly
70+
- uses: Swatinem/rust-cache@v2
71+
- run: cargo check --all-features
72+
env:
73+
RUSTFLAGS: >-
74+
-D unexpected_cfgs
75+
--cfg h2_internal_check_unexpected_cfgs
76+
--check-cfg=cfg(h2_internal_check_unexpected_cfgs,fuzzing)
77+
6478
#clippy_check:
6579
# runs-on: ubuntu-latest
6680
# steps:

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
clippy::undocumented_unsafe_blocks
8686
)]
8787
#![allow(clippy::type_complexity, clippy::manual_range_contains)]
88+
#![cfg_attr(not(h2_internal_check_unexpected_cfgs), allow(unexpected_cfgs))]
8889
#![cfg_attr(test, deny(warnings))]
8990

9091
macro_rules! proto_err {

0 commit comments

Comments
 (0)