Skip to content

Commit 88da498

Browse files
committed
cargo: whitelist cfg flags for latest versions of cargo
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".
1 parent 18bfc5f commit 88da498

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ alloc = []
1818

1919
[target.'cfg(mutate)'.dev-dependencies]
2020
mutagen = { git = "https://github.com/llogiq/mutagen" }
21+
22+
[lints.rust]
23+
unexpected_cfgs = { level = "deny", check-cfg = [ 'cfg(bench)', 'cfg(kani)', 'cfg(mutate)' ] }

0 commit comments

Comments
 (0)