3 #![warn(clippy::needless_bitwise_bool)]
5 fn returns_bool() -> bool {
9 const fn const_returns_bool() -> bool {
14 let (x, y) = (false, true);
18 if returns_bool() & x {
21 if !returns_bool() & returns_bool() {
28 // BELOW: lints we hope to catch as `Expr::can_have_side_effects` improves.
29 if y & !const_returns_bool() {
30 println!("true") // This is a const function, in an UnOp
33 if y & "abcD".is_empty() {
34 println!("true") // This is a const method call
38 println!("true") // This is a BinOp with no side effects