]> git.lizzy.rs Git - rust.git/blob - tests/ui/formatting.stderr
Teach `suspicious_else_formatting` about `if .. {..} {..}`
[rust.git] / tests / ui / formatting.stderr
1 error: this looks like an `else {..}` but the `else` is missing
2   --> $DIR/formatting.rs:21:6
3    |
4 21 |     } {
5    |      ^
6    |
7    = note: `-D clippy::suspicious-else-formatting` implied by `-D warnings`
8    = note: to remove this lint, add the missing `else` or add a new line before the next block
9
10 error: this looks like an `else if` but the `else` is missing
11   --> $DIR/formatting.rs:25:6
12    |
13 25 |     } if foo() {
14    |      ^
15    |
16    = note: to remove this lint, add the missing `else` or add a new line before the second `if`
17
18 error: this looks like an `else if` but the `else` is missing
19   --> $DIR/formatting.rs:32:10
20    |
21 32 |         } if foo() {
22    |          ^
23    |
24    = note: to remove this lint, add the missing `else` or add a new line before the second `if`
25
26 error: this looks like an `else if` but the `else` is missing
27   --> $DIR/formatting.rs:40:10
28    |
29 40 |         } if foo() {
30    |          ^
31    |
32    = note: to remove this lint, add the missing `else` or add a new line before the second `if`
33
34 error: this is an `else {..}` but the formatting might hide it
35   --> $DIR/formatting.rs:49:6
36    |
37 49 |       } else
38    |  ______^
39 50 | |     {
40    | |____^
41    |
42    = note: to remove this lint, remove the `else` or remove the new line between `else` and `{..}`
43
44 error: this is an `else {..}` but the formatting might hide it
45   --> $DIR/formatting.rs:54:6
46    |
47 54 |       }
48    |  ______^
49 55 | |     else
50 56 | |     {
51    | |____^
52    |
53    = note: to remove this lint, remove the `else` or remove the new line between `else` and `{..}`
54
55 error: this is an `else if` but the formatting might hide it
56   --> $DIR/formatting.rs:60:6
57    |
58 60 |       } else
59    |  ______^
60 61 | |     if foo() { // the span of the above error should continue here
61    | |____^
62    |
63    = note: to remove this lint, remove the `else` or remove the new line between `else` and `if`
64
65 error: this is an `else if` but the formatting might hide it
66   --> $DIR/formatting.rs:65:6
67    |
68 65 |       }
69    |  ______^
70 66 | |     else
71 67 | |     if foo() { // the span of the above error should continue here
72    | |____^
73    |
74    = note: to remove this lint, remove the `else` or remove the new line between `else` and `if`
75
76 error: this looks like you are trying to use `.. -= ..`, but you really are doing `.. = (- ..)`
77    --> $DIR/formatting.rs:106:6
78     |
79 106 |     a =- 35;
80     |      ^^^^
81     |
82     = note: `-D clippy::suspicious-assignment-formatting` implied by `-D warnings`
83     = note: to remove this lint, use either `-=` or `= -`
84
85 error: this looks like you are trying to use `.. *= ..`, but you really are doing `.. = (* ..)`
86    --> $DIR/formatting.rs:107:6
87     |
88 107 |     a =* &191;
89     |      ^^^^
90     |
91     = note: to remove this lint, use either `*=` or `= *`
92
93 error: this looks like you are trying to use `.. != ..`, but you really are doing `.. = (! ..)`
94    --> $DIR/formatting.rs:110:6
95     |
96 110 |     b =! false;
97     |      ^^^^
98     |
99     = note: to remove this lint, use either `!=` or `= !`
100
101 error: possibly missing a comma here
102    --> $DIR/formatting.rs:119:19
103     |
104 119 |         -1, -2, -3 // <= no comma here
105     |                   ^
106     |
107     = note: `-D clippy::possible-missing-comma` implied by `-D warnings`
108     = note: to remove this lint, add a comma or write the expr in a single line
109
110 error: possibly missing a comma here
111    --> $DIR/formatting.rs:123:19
112     |
113 123 |         -1, -2, -3 // <= no comma here
114     |                   ^
115     |
116     = note: to remove this lint, add a comma or write the expr in a single line
117
118 error: aborting due to 13 previous errors
119