From 9edfcb83c1a6cbdb2cbb9bb6adda8f8d1e050209 Mon Sep 17 00:00:00 2001 From: Urgau Date: Mon, 27 May 2024 15:02:39 +0200 Subject: [PATCH 1/3] Revert "chore(lib): fix unexpected cfg warning (#3660)" This reverts commit 56ef0cc791949b9ce9d2aaf202fa13af3a776b52. --- .github/workflows/CI.yml | 17 ----------------- src/lib.rs | 1 - 2 files changed, 18 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index fa765ae9b7..bd03dbaff3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,7 +23,6 @@ jobs: - features - ffi - ffi-header - - unexpected-cfgs - doc - check-external-types - udeps @@ -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] diff --git a/src/lib.rs b/src/lib.rs index 0e734aa551..23087a0efe 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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))] From 9b666546d41880b14a5d87b787dfa0d06db59fae Mon Sep 17 00:00:00 2001 From: Urgau Date: Mon, 27 May 2024 15:06:18 +0200 Subject: [PATCH 2/3] Add unexpected cfgs into lints table --- Cargo.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index a0c02d8ce1..8f2a00f4bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -93,6 +93,13 @@ 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"] From c8162cc846d66f03b93b42f8c91191e51727f880 Mon Sep 17 00:00:00 2001 From: Urgau Date: Mon, 27 May 2024 15:07:27 +0200 Subject: [PATCH 3/3] Remove now uncecessary manual docsrs cfg for docs.rs --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 8f2a00f4bd..3f38c8bc26 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -102,7 +102,7 @@ check-cfg = [ [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"] [package.metadata.playground] features = ["full"]