From 938dba6e02c77191457568f5887aa632a5d30222 Mon Sep 17 00:00:00 2001 From: Martin Habovstiak Date: Wed, 3 Jul 2024 06:02:12 +0200 Subject: [PATCH] Whitelist known cfgs Rust is now checking cfg attributes for typos but this interferes with our cfgs that rustc/cargo don't recognize. This whitelists them so they no longer produce warnings. This is a backport of 614fe817 because the warnings make development very annoying. --- Cargo.toml | 2 ++ secp256k1-sys/Cargo.toml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index bf78b3982..38b2dcb86 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,6 +54,8 @@ bincode = "1.3.3" wasm-bindgen-test = "0.3" getrandom = { version = "0.2", features = ["js"] } +[lints.rust] +unexpected_cfgs = { level = "deny", check-cfg = ['cfg(bench)', 'cfg(secp256k1_fuzz)', 'cfg(rust_secp_no_symbol_renaming)'] } [[example]] name = "sign_verify_recovery" diff --git a/secp256k1-sys/Cargo.toml b/secp256k1-sys/Cargo.toml index 5d591ffcb..1ca432045 100644 --- a/secp256k1-sys/Cargo.toml +++ b/secp256k1-sys/Cargo.toml @@ -32,3 +32,6 @@ recovery = [] lowmemory = [] std = ["alloc"] alloc = [] + +[lints.rust] +unexpected_cfgs = { level = "deny", check-cfg = ['cfg(bench)', 'cfg(secp256k1_fuzz)', 'cfg(rust_secp_no_symbol_renaming)'] }