needless_bool
triggers on cfg!
comparisons
#3973
Labels
C-bug
Category: Clippy is not doing the correct thing
good-first-issue
These issues are a good way to get started with Clippy
L-suggestion
Lint: Improving, adding or fixing lint suggestions
T-macros
Type: Issues with macros and macro expansion
Clippy gives wrong suggestions if there's a bool comparison with a result of
cfg!(...)
macro, e.g. testing for a feature flag:If I try to compile with the future switched on (
cargo build --features use-mock-routing
), it gives an opposite suggestion:Version:
The text was updated successfully, but these errors were encountered: