Skip to content

Commit 4ac39d5

Browse files
authored
chore: use lints.rust.unexpected_cfgs in manifest (#785)
1 parent 6868712 commit 4ac39d5

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

.github/workflows/CI.yml

-14
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,6 @@ 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-
7864
#clippy_check:
7965
# runs-on: ubuntu-latest
8066
# steps:

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ env_logger = { version = "0.10", default-features = false }
6969
tokio-rustls = "0.26"
7070
webpki-roots = "0.26"
7171

72+
[lints.rust]
73+
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(fuzzing)"] }
74+
7275
[package.metadata.docs.rs]
7376
features = ["stream"]
7477

src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
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))]
8988
#![cfg_attr(test, deny(warnings))]
9089

9190
macro_rules! proto_err {

0 commit comments

Comments
 (0)