Skip to content

Commit 554abdf

Browse files
FreezyLemonshssoichiro
authored andcommitted
Expect custom cfgs
cfgs that are not features or dependencies from Cargo.toml (so e.g. cfgs set by build.rs or external tools like cargo-fuzz) will cause compiler warnings starting with Rust 1.80.
1 parent 0548232 commit 554abdf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Cargo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ rand_chacha = "0.3"
162162
[target.'cfg(any(decode_test, decode_test_dav1d))'.dependencies]
163163
system-deps = "6"
164164

165+
[lints.rust.unexpected_cfgs]
166+
level = "warn"
167+
# These custom cfgs are expected, so tell rustc not to output warnings for them
168+
check-cfg = ['cfg(nasm_x86_64)', 'cfg(asm_neon)', 'cfg(cargo_c)', 'cfg(fuzzing)']
169+
165170
[[bin]]
166171
name = "rav1e"
167172
required-features = ["binaries"]

0 commit comments

Comments
 (0)