error: this boolean expression contains a logic bug
--> src/main.rs:3:12
|
3 | loop { _ = (break) || true; }
| ^^^^^^^^^^^^^^^ help: it would look like the following: `true`
|
help: this expression can be optimized out by applying boolean operations to the outer expression
--> src/main.rs:3:12
|
3 | loop { _ = (break) || true; }
| ^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#overly_complex_bool_expr
= note: `#[deny(clippy::overly_complex_bool_expr)]` on by default
Summary
this triggers the
overly_complex_bool_expr
error, incorrectly, as it suggestsloop { _ = true }
.Lint Name
overly_complex_bool_expr
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
Version
Additional Labels
No response