summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui-internal/if_chain_style.stderr
blob: d8f1ffb21ba67907847eb8e54c7abf4d10f44557 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
error: this `if` can be part of the inner `if_chain!`
  --> $DIR/if_chain_style.rs:9:5
   |
LL | /     if true {
LL | |         let x = "";
LL | |         // `if_chain!` inside `if`
LL | |         if_chain! {
...  |
LL | |         }
LL | |     }
   | |_____^
   |
help: this `let` statement can also be in the `if_chain!`
  --> $DIR/if_chain_style.rs:10:9
   |
LL |         let x = "";
   |         ^^^^^^^^^^^
   = note: `-D clippy::if-chain-style` implied by `-D warnings`

error: `if a && b;` should be `if a; if b;`
  --> $DIR/if_chain_style.rs:19:12
   |
LL |           if true
   |  ____________^
LL | |             // multi-line AND'ed conditions
LL | |             && false;
   | |____________________^

error: `let` expression should be inside `then { .. }`
  --> $DIR/if_chain_style.rs:24:9
   |
LL |         let x = "";
   |         ^^^^^^^^^^^

error: this `if` can be part of the outer `if_chain!`
  --> $DIR/if_chain_style.rs:35:13
   |
LL |             if true {}
   |             ^^^^^^^^^^
   |
help: this `let` statement can also be in the `if_chain!`
  --> $DIR/if_chain_style.rs:33:13
   |
LL |             let x = "";
   |             ^^^^^^^^^^^

error: `if_chain!` only has one `if`
  --> $DIR/if_chain_style.rs:29:5
   |
LL | /     if_chain! {
LL | |         // single `if` condition
LL | |         if true;
LL | |         then {
...  |
LL | |         }
LL | |     }
   | |_____^
   |
   = note: this error originates in the macro `__if_chain` which comes from the expansion of the macro `if_chain` (in Nightly builds, run with -Z macro-backtrace for more info)

error: `let` expression should be above the `if_chain!`
  --> $DIR/if_chain_style.rs:40:9
   |
LL |         let x = "";
   |         ^^^^^^^^^^^

error: this `if_chain!` can be merged with the outer `if_chain!`
  --> $DIR/if_chain_style.rs:46:13
   |
LL | /             if_chain! {
LL | |                 if true;
LL | |                 if true;
LL | |                 then {}
LL | |             }
   | |_____________^
   |
help: these `let` statements can also be in the `if_chain!`
  --> $DIR/if_chain_style.rs:43:13
   |
LL | /             let x = "";
LL | |             let x = "";
   | |_______________________^

error: aborting due to 7 previous errors