Skip to content

Commit

Permalink
Add unexpected_cfgs lint exception, fixes #182 (#183)
Browse files Browse the repository at this point in the history
> 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
  • Loading branch information
brandonpike committed Aug 23, 2024
1 parent dda269f commit 7b8d6d6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ tracing-subscriber = "0.3"
[features]
default = []
regex = ["dep:regex"]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] }

0 comments on commit 7b8d6d6

Please sign in to comment.