1 error: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let'
2 --> $DIR/block_in_if_condition.rs:30:8
11 note: lint level defined here
12 --> $DIR/block_in_if_condition.rs:5:9
14 5 | #![deny(block_in_if_condition_stmt)]
15 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
25 error: omit braces around single expression condition
26 --> $DIR/block_in_if_condition.rs:41:8
31 note: lint level defined here
32 --> $DIR/block_in_if_condition.rs:4:9
34 4 | #![deny(block_in_if_condition_expr)]
35 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
41 error: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let'
42 --> $DIR/block_in_if_condition.rs:58:49
44 58 | if v == 3 && sky == "blue" && predicate(|x| { let target = 3; x == target }, v) {
45 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47 error: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let'
48 --> $DIR/block_in_if_condition.rs:62:22
50 62 | if predicate(|x| { let target = 3; x == target }, v) {
51 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
53 warning: this boolean expression can be simplified
54 --> $DIR/block_in_if_condition.rs:70:8
56 70 | if true && x == 3 {
59 note: lint level defined here
60 --> $DIR/block_in_if_condition.rs:7:9
62 7 | #![warn(nonminimal_bool)]
67 error: aborting due to 4 previous errors