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 --> block_in_if_condition.rs:30:8
11 = note: `-D block-in-if-condition-stmt` implied by `-D warnings`
21 error: omit braces around single expression condition
22 --> block_in_if_condition.rs:41:8
27 = note: `-D block-in-if-condition-expr` implied by `-D warnings`
33 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'
34 --> block_in_if_condition.rs:58:49
36 58 | if v == 3 && sky == "blue" && predicate(|x| { let target = 3; x == target }, v) {
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39 = note: `-D block-in-if-condition-stmt` implied by `-D warnings`
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 --> block_in_if_condition.rs:61:22
44 61 | if predicate(|x| { let target = 3; x == target }, v) {
45 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47 = note: `-D block-in-if-condition-stmt` implied by `-D warnings`
49 error: this boolean expression can be simplified
50 --> block_in_if_condition.rs:67:8
52 67 | if true && x == 3 {
53 | ^^^^^^^^^^^^^^ help: try `x == 3`
55 = note: `-D nonminimal-bool` implied by `-D warnings`
57 error: aborting due to previous error(s)
59 error: Could not compile `clippy_tests`.
61 To learn more, run the command again with --verbose.