From c5c5213a23e6f23bbac4f1ee9f45894833ffcb55 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 8 May 2024 07:56:17 +1000 Subject: [PATCH] Allow unexpected_cfgs Rust `nightly` just introduced a new lint that breaks us, disable it. Same as https://github.com/rust-bitcoin/rust-bitcoin/pull/2748 Please see 2748 for full description of the issue this resolves. --- fuzz/fuzz_targets/compile_descriptor.rs | 2 ++ fuzz/fuzz_targets/parse_descriptor.rs | 2 ++ fuzz/fuzz_targets/parse_descriptor_secret.rs | 2 ++ fuzz/fuzz_targets/roundtrip_concrete.rs | 2 ++ fuzz/fuzz_targets/roundtrip_descriptor.rs | 2 ++ fuzz/fuzz_targets/roundtrip_miniscript_script.rs | 2 ++ fuzz/fuzz_targets/roundtrip_miniscript_str.rs | 2 ++ fuzz/fuzz_targets/roundtrip_semantic.rs | 2 ++ src/lib.rs | 2 ++ 9 files changed, 18 insertions(+) diff --git a/fuzz/fuzz_targets/compile_descriptor.rs b/fuzz/fuzz_targets/compile_descriptor.rs index cfd6c7f4f..b246ed7a7 100644 --- a/fuzz/fuzz_targets/compile_descriptor.rs +++ b/fuzz/fuzz_targets/compile_descriptor.rs @@ -1,3 +1,5 @@ +#![allow(unexpected_cfgs)] + use std::str::FromStr; use honggfuzz::fuzz; diff --git a/fuzz/fuzz_targets/parse_descriptor.rs b/fuzz/fuzz_targets/parse_descriptor.rs index 1d1ee77a1..040b6730d 100644 --- a/fuzz/fuzz_targets/parse_descriptor.rs +++ b/fuzz/fuzz_targets/parse_descriptor.rs @@ -1,3 +1,5 @@ +#![allow(unexpected_cfgs)] + use std::str::FromStr; use honggfuzz::fuzz; diff --git a/fuzz/fuzz_targets/parse_descriptor_secret.rs b/fuzz/fuzz_targets/parse_descriptor_secret.rs index 8ef758bb5..76c4eb4fc 100644 --- a/fuzz/fuzz_targets/parse_descriptor_secret.rs +++ b/fuzz/fuzz_targets/parse_descriptor_secret.rs @@ -1,3 +1,5 @@ +#![allow(unexpected_cfgs)] + use std::str::FromStr; use honggfuzz::fuzz; diff --git a/fuzz/fuzz_targets/roundtrip_concrete.rs b/fuzz/fuzz_targets/roundtrip_concrete.rs index 41e437221..3480393ca 100644 --- a/fuzz/fuzz_targets/roundtrip_concrete.rs +++ b/fuzz/fuzz_targets/roundtrip_concrete.rs @@ -1,3 +1,5 @@ +#![allow(unexpected_cfgs)] + use std::str::FromStr; use honggfuzz::fuzz; diff --git a/fuzz/fuzz_targets/roundtrip_descriptor.rs b/fuzz/fuzz_targets/roundtrip_descriptor.rs index b9363f130..c682f3320 100644 --- a/fuzz/fuzz_targets/roundtrip_descriptor.rs +++ b/fuzz/fuzz_targets/roundtrip_descriptor.rs @@ -1,3 +1,5 @@ +#![allow(unexpected_cfgs)] + use std::str::FromStr; use honggfuzz::fuzz; diff --git a/fuzz/fuzz_targets/roundtrip_miniscript_script.rs b/fuzz/fuzz_targets/roundtrip_miniscript_script.rs index 2215e18a5..cd44c455c 100644 --- a/fuzz/fuzz_targets/roundtrip_miniscript_script.rs +++ b/fuzz/fuzz_targets/roundtrip_miniscript_script.rs @@ -1,3 +1,5 @@ +#![allow(unexpected_cfgs)] + use honggfuzz::fuzz; use miniscript::bitcoin::blockdata::script; use miniscript::{Miniscript, Segwitv0}; diff --git a/fuzz/fuzz_targets/roundtrip_miniscript_str.rs b/fuzz/fuzz_targets/roundtrip_miniscript_str.rs index 9f9bba573..0ae6b3f64 100644 --- a/fuzz/fuzz_targets/roundtrip_miniscript_str.rs +++ b/fuzz/fuzz_targets/roundtrip_miniscript_str.rs @@ -1,3 +1,5 @@ +#![allow(unexpected_cfgs)] + use std::str::FromStr; use honggfuzz::fuzz; diff --git a/fuzz/fuzz_targets/roundtrip_semantic.rs b/fuzz/fuzz_targets/roundtrip_semantic.rs index cebc223b2..668faa354 100644 --- a/fuzz/fuzz_targets/roundtrip_semantic.rs +++ b/fuzz/fuzz_targets/roundtrip_semantic.rs @@ -1,3 +1,5 @@ +#![allow(unexpected_cfgs)] + use std::str::FromStr; use honggfuzz::fuzz; diff --git a/src/lib.rs b/src/lib.rs index f31d49928..d789d16b4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -88,6 +88,8 @@ // Clippy lints that we have disabled #![allow(clippy::iter_kv_map)] // https://github.com/rust-lang/rust-clippy/issues/11752 #![allow(clippy::manual_range_contains)] // I hate this lint -asp +// This one is just batshit. "Your projects are required to either have a build.rs or allow users' dependencies to disable your crypto." +#![allow(unexpected_cfgs)] #[cfg(target_pointer_width = "16")] compile_error!(