Skip to content

Commit

Permalink
Check for unknown features (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
illicitonion authored Jan 15, 2023
1 parent 6604e2b commit ea9c4f0
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/features.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Check for unknown features
on:
push:
branches: ["main"]
pull_request:
jobs:
unknown-features:
name: Check for unknown features
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Fetch toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
- name: Check for unknown features
env:
RUSTFLAGS: "-D unexpected-cfgs"
uses: actions-rs/cargo@v1
with:
command: check
args: -Z unstable-options -Z check-cfg=features --tests
toolchain: nightly
1 change: 0 additions & 1 deletion num_enum/tests/from_primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ fn from_primitive_number() {
}

#[test]
#[cfg(feature = "nightly")]
fn from_primitive_number_catch_all() {
#[derive(Debug, Eq, PartialEq, FromPrimitive)]
#[repr(u8)]
Expand Down
1 change: 0 additions & 1 deletion num_enum/tests/into_primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ fn simple() {
}

#[test]
#[cfg(feature = "nightly")]
fn catch_all() {
#[derive(Debug, Eq, PartialEq, IntoPrimitive)]
#[repr(u8)]
Expand Down

0 comments on commit ea9c4f0

Please sign in to comment.