Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unexpected cfgs to [lints] table #3678

Merged
merged 3 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
- features
- ffi
- ffi-header
- unexpected-cfgs
- doc
- check-external-types
- udeps
Expand Down Expand Up @@ -221,22 +220,6 @@ jobs:
- name: Ensure that hyper.h is up to date
run: ./capi/gen_header.sh --verify

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 hyper_internal_check_unexpected_cfgs
--cfg hyper_unstable_tracing
--cfg hyper_unstable_ffi
--check-cfg=cfg(hyper_internal_check_unexpected_cfgs,hyper_unstable_tracing,hyper_unstable_ffi)

doc:
name: Build docs
needs: [style, test]
Expand Down
9 changes: 8 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,16 @@ tracing = ["dep:tracing"]
# internal features used in CI
nightly = []

[lints.rust.unexpected_cfgs]
level = "warn"
check-cfg = [
'cfg(hyper_unstable_tracing)',
'cfg(hyper_unstable_ffi)'
]

[package.metadata.docs.rs]
features = ["ffi", "full", "tracing"]
rustdoc-args = ["--cfg", "docsrs", "--cfg", "hyper_unstable_ffi", "--cfg", "hyper_unstable_tracing"]
rustdoc-args = ["--cfg", "hyper_unstable_ffi", "--cfg", "hyper_unstable_tracing"]
Urgau marked this conversation as resolved.
Show resolved Hide resolved

[package.metadata.playground]
features = ["full"]
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![deny(missing_docs)]
#![deny(missing_debug_implementations)]
#![cfg_attr(not(hyper_internal_check_unexpected_cfgs), allow(unexpected_cfgs))]
#![cfg_attr(test, deny(rust_2018_idioms))]
#![cfg_attr(all(test, feature = "full"), deny(unreachable_pub))]
#![cfg_attr(all(test, feature = "full"), deny(warnings))]
Expand Down
Loading