]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui-internal/if_chain_style.stderr
Auto merge of #88354 - Jmc18134:hint-space-pauth-opt, r=nagisa
[rust.git] / src / tools / clippy / tests / ui-internal / if_chain_style.stderr
1 error: this `if` can be part of the inner `if_chain!`
2   --> $DIR/if_chain_style.rs:9:5
3    |
4 LL | /     if true {
5 LL | |         let x = "";
6 LL | |         // `if_chain!` inside `if`
7 LL | |         if_chain! {
8 ...  |
9 LL | |         }
10 LL | |     }
11    | |_____^
12    |
13    = note: `-D clippy::if-chain-style` implied by `-D warnings`
14 help: this `let` statement can also be in the `if_chain!`
15   --> $DIR/if_chain_style.rs:10:9
16    |
17 LL |         let x = "";
18    |         ^^^^^^^^^^^
19
20 error: `if a && b;` should be `if a; if b;`
21   --> $DIR/if_chain_style.rs:19:12
22    |
23 LL |           if true
24    |  ____________^
25 LL | |             // multi-line AND'ed conditions
26 LL | |             && false;
27    | |____________________^
28
29 error: `let` expression should be inside `then { .. }`
30   --> $DIR/if_chain_style.rs:24:9
31    |
32 LL |         let x = "";
33    |         ^^^^^^^^^^^
34
35 error: this `if` can be part of the outer `if_chain!`
36   --> $DIR/if_chain_style.rs:35:13
37    |
38 LL |             if true {}
39    |             ^^^^^^^^^^
40    |
41 help: this `let` statement can also be in the `if_chain!`
42   --> $DIR/if_chain_style.rs:33:13
43    |
44 LL |             let x = "";
45    |             ^^^^^^^^^^^
46
47 error: `if_chain!` only has one `if`
48   --> $DIR/if_chain_style.rs:29:5
49    |
50 LL | /     if_chain! {
51 LL | |         // single `if` condition
52 LL | |         if true;
53 LL | |         then {
54 ...  |
55 LL | |         }
56 LL | |     }
57    | |_____^
58    |
59    = note: this error originates in the macro `__if_chain` (in Nightly builds, run with -Z macro-backtrace for more info)
60
61 error: `let` expression should be above the `if_chain!`
62   --> $DIR/if_chain_style.rs:40:9
63    |
64 LL |         let x = "";
65    |         ^^^^^^^^^^^
66
67 error: this `if_chain!` can be merged with the outer `if_chain!`
68   --> $DIR/if_chain_style.rs:46:13
69    |
70 LL | /             if_chain! {
71 LL | |                 if true;
72 LL | |                 if true;
73 LL | |                 then {}
74 LL | |             }
75    | |_____________^
76    |
77 help: these `let` statements can also be in the `if_chain!`
78   --> $DIR/if_chain_style.rs:43:13
79    |
80 LL | /             let x = "";
81 LL | |             let x = "";
82    | |_______________________^
83
84 error: aborting due to 7 previous errors
85