Open bvanjoi opened 1 month ago
How often do boolean expressions with multiple literal operands actually arise in practice? Feels rather niche.
Clippy already lints those four cases. false && cond
& true || cond
are often used for quick debugging, so not warning what the user intended to do is a nice thing imo.
As noted, clippy::nonminimal_bool
covers these. In theory they could be uplifted to regular lints, but this feels more like a cleanliness lint rather than correctness.
Code
Current output
Desired output
No response
Rationale and extra context
No response
Other cases
No response
Rust Version
Anything else?
No response