Skip to content

Commit

Permalink
fix unexpected cfg on nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
dswij committed May 8, 2024
1 parent 309daae commit a73c6f2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,17 @@ jobs:
run: rustup component add rust-src
- name: Run tests with sanitizer
run: make test_sanitizer SAN=${{ matrix.sanitizer }}
UnexpectedCfgs:
runs-on: ubuntu-latest
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 internal_check_unexpected_cfgs
# Single job required to merge the pr.
Passed:
runs-on: ubuntu-latest
Expand All @@ -179,5 +190,6 @@ jobs:
- Rustfmt
- CheckTargets
- CheckTier3Targets
- UnexpectedCfgs
steps:
- run: exit 0
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
unused_imports,
dead_code
)]
#![cfg_attr(internal_check_unexpected_cfgs, allow(unexpected_cfgs))]
#![cfg_attr(docsrs, feature(doc_cfg))]
// Disallow warnings when running tests.
#![cfg_attr(test, deny(warnings))]
Expand Down

0 comments on commit a73c6f2

Please sign in to comment.