diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a2375353..1247cac3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -61,6 +61,20 @@ jobs: run: ./ci/h2spec.sh if: matrix.rust == 'stable' + unexpected-cfgs: + runs-on: ubuntu-latest + needs: [style] + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + - uses: Swatinem/rust-cache@v2 + - run: cargo check --all-features + env: + RUSTFLAGS: >- + -D unexpected_cfgs + --cfg h2_internal_check_unexpected_cfgs + --check-cfg=cfg(h2_internal_check_unexpected_cfgs,fuzzing) + #clippy_check: # runs-on: ubuntu-latest # steps: diff --git a/src/lib.rs b/src/lib.rs index fd7782f8..5f596653 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -85,6 +85,7 @@ clippy::undocumented_unsafe_blocks )] #![allow(clippy::type_complexity, clippy::manual_range_contains)] +#![cfg_attr(not(h2_internal_check_unexpected_cfgs), allow(unexpected_cfgs))] #![cfg_attr(test, deny(warnings))] macro_rules! proto_err {