Skip to content

Commit

Permalink
cargo: whitelist cfg flags for latest versions of cargo
Browse files Browse the repository at this point in the history
cargo now complains about #[cfg] attributes that don't match cargo
features, unless you explicitly whitelist them. This is very useful for
catching typos. Whitelist the ones we use, and set the lint from "warn"
to "deny".
  • Loading branch information
apoelstra committed Jul 5, 2024
1 parent 18bfc5f commit 88da498
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ alloc = []

[target.'cfg(mutate)'.dev-dependencies]
mutagen = { git = "https://github.com/llogiq/mutagen" }

[lints.rust]
unexpected_cfgs = { level = "deny", check-cfg = [ 'cfg(bench)', 'cfg(kani)', 'cfg(mutate)' ] }

0 comments on commit 88da498

Please sign in to comment.