]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/blocks_in_if_conditions_closure.stderr
Auto merge of #84620 - Dylan-DPC:rollup-wkv97im, r=Dylan-DPC
[rust.git] / src / tools / clippy / tests / ui / blocks_in_if_conditions_closure.stderr
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/blocks_in_if_conditions_closure.rs:18:17
3    |
4 LL |               |x| {
5    |  _________________^
6 LL | |                 let target = 3;
7 LL | |                 x == target
8 LL | |             },
9    | |_____________^
10    |
11    = note: `-D clippy::blocks-in-if-conditions` implied by `-D warnings`
12
13 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`
14   --> $DIR/blocks_in_if_conditions_closure.rs:27:13
15    |
16 LL |           |x| {
17    |  _____________^
18 LL | |             let target = 3;
19 LL | |             x == target
20 LL | |         },
21    | |_________^
22
23 error: aborting due to 2 previous errors
24