clippy::nonminimal_bool
False positive on !0u32
#12408
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
Clippy suggests to transform
var == !0u32
intovar != 0u32
which are not equivalent.See: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=97011897f0ad26ee23256f928eae9df2
Lint Name
clippy::nonminimal_bool
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
No warnings.
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: