From 8cee3bb69d034d1cbe3edfc20f11da169b3a0ed8 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Wed, 22 Jan 2025 15:03:55 +0100 Subject: [PATCH] Add `check-cfg` lint to `fuzz` to quiet warnings Previously, the fuzzer would complain about unknown `cfg` flags. Here, we add them to the list of allowed flags to quiet the many warnings. --- fuzz/Cargo.toml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index a0f748d2349..37c0cb20244 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -49,3 +49,13 @@ opt-level = 1 name = "lightning_fuzz" path = "src/lib.rs" crate-type = ["rlib", "dylib", "staticlib"] + +[lints.rust.unexpected_cfgs] +level = "forbid" +# When adding a new cfg attribute, ensure that it is added to this list. +check-cfg = [ + "cfg(fuzzing)", + "cfg(secp256k1_fuzz)", + "cfg(hashes_fuzz)", + "cfg(taproot)", +]