From 7b8d6d654cac69bc1894bc092c0c3005bcdb77dd Mon Sep 17 00:00:00 2001 From: brandonpike Date: Fri, 23 Aug 2024 13:39:27 -0500 Subject: [PATCH] Add unexpected_cfgs lint exception, fixes #182 (#183) > Some crates might use custom cfgs, like loom, fuzzing or tokio_unstable that they expected from the environment (RUSTFLAGS or other means) and which are always statically known at compile time. For those cases, Cargo provides via the [lints] table a way to statically declare those cfgs as expected. Reference: https://blog.rust-lang.org/2024/05/06/check-cfg.html --- Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index d49ad1e..9953995 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,3 +42,6 @@ tracing-subscriber = "0.3" [features] default = [] regex = ["dep:regex"] + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] }