Skip to content

Commit 0a22e78

Browse files
authored
chore(cargo): add unexpected cfgs to [lints] table (#3678)
1 parent 0eb1b6c commit 0a22e78

File tree

3 files changed

+8
-19
lines changed

3 files changed

+8
-19
lines changed

.github/workflows/CI.yml

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

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 hyper_internal_check_unexpected_cfgs
236-
--cfg hyper_unstable_tracing
237-
--cfg hyper_unstable_ffi
238-
--check-cfg=cfg(hyper_internal_check_unexpected_cfgs,hyper_unstable_tracing,hyper_unstable_ffi)
239-
240223
doc:
241224
name: Build docs
242225
needs: [style, test]

Cargo.toml

+8-1
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,16 @@ tracing = ["dep:tracing"]
9393
# internal features used in CI
9494
nightly = []
9595

96+
[lints.rust.unexpected_cfgs]
97+
level = "warn"
98+
check-cfg = [
99+
'cfg(hyper_unstable_tracing)',
100+
'cfg(hyper_unstable_ffi)'
101+
]
102+
96103
[package.metadata.docs.rs]
97104
features = ["ffi", "full", "tracing"]
98-
rustdoc-args = ["--cfg", "docsrs", "--cfg", "hyper_unstable_ffi", "--cfg", "hyper_unstable_tracing"]
105+
rustdoc-args = ["--cfg", "hyper_unstable_ffi", "--cfg", "hyper_unstable_tracing"]
99106

100107
[package.metadata.playground]
101108
features = ["full"]

src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![deny(missing_docs)]
22
#![deny(missing_debug_implementations)]
3-
#![cfg_attr(not(hyper_internal_check_unexpected_cfgs), allow(unexpected_cfgs))]
43
#![cfg_attr(test, deny(rust_2018_idioms))]
54
#![cfg_attr(all(test, feature = "full"), deny(unreachable_pub))]
65
#![cfg_attr(all(test, feature = "full"), deny(warnings))]

0 commit comments

Comments
 (0)