]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error: unnecessary parentheses around `return` value |
f035d41b | 2 | --> $DIR/lint-unnecessary-parens.rs:13:12 |
b7449926 | 3 | | |
532ac7d7 | 4 | LL | return (1); |
c295e0f8 | 5 | | ^ ^ |
b7449926 | 6 | | |
74b04a01 | 7 | note: the lint level is defined here |
f035d41b | 8 | --> $DIR/lint-unnecessary-parens.rs:3:9 |
b7449926 XL |
9 | | |
10 | LL | #![deny(unused_parens)] | |
11 | | ^^^^^^^^^^^^^ | |
c295e0f8 XL |
12 | help: remove these parentheses |
13 | | | |
14 | LL - return (1); | |
15 | LL + return 1; | |
923072b8 | 16 | | |
b7449926 XL |
17 | |
18 | error: unnecessary parentheses around `return` value | |
f035d41b | 19 | --> $DIR/lint-unnecessary-parens.rs:16:12 |
b7449926 | 20 | | |
532ac7d7 | 21 | LL | return (X { y }); |
c295e0f8 XL |
22 | | ^ ^ |
23 | | | |
24 | help: remove these parentheses | |
25 | | | |
26 | LL - return (X { y }); | |
27 | LL + return X { y }; | |
923072b8 | 28 | | |
b7449926 | 29 | |
e74abb32 | 30 | error: unnecessary parentheses around type |
f035d41b | 31 | --> $DIR/lint-unnecessary-parens.rs:19:46 |
e74abb32 | 32 | | |
f035d41b | 33 | LL | pub fn unused_parens_around_return_type() -> (u32) { |
c295e0f8 XL |
34 | | ^ ^ |
35 | | | |
36 | help: remove these parentheses | |
37 | | | |
38 | LL - pub fn unused_parens_around_return_type() -> (u32) { | |
39 | LL + pub fn unused_parens_around_return_type() -> u32 { | |
923072b8 | 40 | | |
e74abb32 | 41 | |
dfeec247 | 42 | error: unnecessary parentheses around block return value |
f035d41b | 43 | --> $DIR/lint-unnecessary-parens.rs:25:9 |
dfeec247 XL |
44 | | |
45 | LL | (5) | |
c295e0f8 XL |
46 | | ^ ^ |
47 | | | |
48 | help: remove these parentheses | |
49 | | | |
50 | LL - (5) | |
51 | LL + 5 | |
923072b8 | 52 | | |
dfeec247 XL |
53 | |
54 | error: unnecessary parentheses around block return value | |
f035d41b | 55 | --> $DIR/lint-unnecessary-parens.rs:27:5 |
dfeec247 XL |
56 | | |
57 | LL | (5) | |
c295e0f8 XL |
58 | | ^ ^ |
59 | | | |
60 | help: remove these parentheses | |
61 | | | |
62 | LL - (5) | |
63 | LL + 5 | |
923072b8 | 64 | | |
dfeec247 | 65 | |
74b04a01 | 66 | error: unnecessary parentheses around assigned value |
f035d41b | 67 | --> $DIR/lint-unnecessary-parens.rs:44:31 |
74b04a01 | 68 | | |
f035d41b | 69 | LL | pub const CONST_ITEM: usize = (10); |
c295e0f8 XL |
70 | | ^ ^ |
71 | | | |
72 | help: remove these parentheses | |
73 | | | |
74 | LL - pub const CONST_ITEM: usize = (10); | |
75 | LL + pub const CONST_ITEM: usize = 10; | |
923072b8 | 76 | | |
74b04a01 XL |
77 | |
78 | error: unnecessary parentheses around assigned value | |
f035d41b | 79 | --> $DIR/lint-unnecessary-parens.rs:45:33 |
74b04a01 | 80 | | |
f035d41b | 81 | LL | pub static STATIC_ITEM: usize = (10); |
c295e0f8 XL |
82 | | ^ ^ |
83 | | | |
84 | help: remove these parentheses | |
85 | | | |
86 | LL - pub static STATIC_ITEM: usize = (10); | |
87 | LL + pub static STATIC_ITEM: usize = 10; | |
923072b8 | 88 | | |
74b04a01 | 89 | |
b7449926 | 90 | error: unnecessary parentheses around function argument |
f035d41b | 91 | --> $DIR/lint-unnecessary-parens.rs:49:9 |
b7449926 | 92 | | |
532ac7d7 | 93 | LL | bar((true)); |
c295e0f8 XL |
94 | | ^ ^ |
95 | | | |
96 | help: remove these parentheses | |
97 | | | |
98 | LL - bar((true)); | |
99 | LL + bar(true); | |
923072b8 | 100 | | |
b7449926 XL |
101 | |
102 | error: unnecessary parentheses around `if` condition | |
f035d41b | 103 | --> $DIR/lint-unnecessary-parens.rs:51:8 |
b7449926 | 104 | | |
532ac7d7 | 105 | LL | if (true) {} |
c295e0f8 XL |
106 | | ^ ^ |
107 | | | |
108 | help: remove these parentheses | |
109 | | | |
110 | LL - if (true) {} | |
111 | LL + if true {} | |
923072b8 | 112 | | |
b7449926 XL |
113 | |
114 | error: unnecessary parentheses around `while` condition | |
f035d41b | 115 | --> $DIR/lint-unnecessary-parens.rs:52:11 |
b7449926 | 116 | | |
532ac7d7 | 117 | LL | while (true) {} |
c295e0f8 XL |
118 | | ^ ^ |
119 | | | |
120 | help: remove these parentheses | |
121 | | | |
122 | LL - while (true) {} | |
123 | LL + while true {} | |
923072b8 | 124 | | |
b7449926 | 125 | |
ba9703b0 | 126 | error: unnecessary parentheses around `match` scrutinee expression |
f035d41b | 127 | --> $DIR/lint-unnecessary-parens.rs:53:11 |
b7449926 | 128 | | |
532ac7d7 | 129 | LL | match (true) { |
c295e0f8 XL |
130 | | ^ ^ |
131 | | | |
132 | help: remove these parentheses | |
133 | | | |
134 | LL - match (true) { | |
135 | LL + match true { | |
923072b8 | 136 | | |
b7449926 | 137 | |
ba9703b0 | 138 | error: unnecessary parentheses around `let` scrutinee expression |
f035d41b | 139 | --> $DIR/lint-unnecessary-parens.rs:56:16 |
b7449926 | 140 | | |
532ac7d7 | 141 | LL | if let 1 = (1) {} |
c295e0f8 XL |
142 | | ^ ^ |
143 | | | |
144 | help: remove these parentheses | |
145 | | | |
146 | LL - if let 1 = (1) {} | |
147 | LL + if let 1 = 1 {} | |
923072b8 | 148 | | |
b7449926 | 149 | |
ba9703b0 | 150 | error: unnecessary parentheses around `let` scrutinee expression |
f035d41b | 151 | --> $DIR/lint-unnecessary-parens.rs:57:19 |
b7449926 | 152 | | |
532ac7d7 | 153 | LL | while let 1 = (2) {} |
c295e0f8 XL |
154 | | ^ ^ |
155 | | | |
156 | help: remove these parentheses | |
157 | | | |
158 | LL - while let 1 = (2) {} | |
159 | LL + while let 1 = 2 {} | |
923072b8 | 160 | | |
b7449926 XL |
161 | |
162 | error: unnecessary parentheses around method argument | |
29967ef6 | 163 | --> $DIR/lint-unnecessary-parens.rs:73:24 |
b7449926 | 164 | | |
532ac7d7 | 165 | LL | X { y: false }.foo((true)); |
c295e0f8 XL |
166 | | ^ ^ |
167 | | | |
168 | help: remove these parentheses | |
169 | | | |
170 | LL - X { y: false }.foo((true)); | |
171 | LL + X { y: false }.foo(true); | |
923072b8 | 172 | | |
b7449926 XL |
173 | |
174 | error: unnecessary parentheses around assigned value | |
29967ef6 | 175 | --> $DIR/lint-unnecessary-parens.rs:75:18 |
b7449926 | 176 | | |
532ac7d7 | 177 | LL | let mut _a = (0); |
c295e0f8 XL |
178 | | ^ ^ |
179 | | | |
180 | help: remove these parentheses | |
181 | | | |
182 | LL - let mut _a = (0); | |
183 | LL + let mut _a = 0; | |
923072b8 | 184 | | |
b7449926 XL |
185 | |
186 | error: unnecessary parentheses around assigned value | |
29967ef6 | 187 | --> $DIR/lint-unnecessary-parens.rs:76:10 |
b7449926 | 188 | | |
532ac7d7 | 189 | LL | _a = (0); |
c295e0f8 XL |
190 | | ^ ^ |
191 | | | |
192 | help: remove these parentheses | |
193 | | | |
194 | LL - _a = (0); | |
195 | LL + _a = 0; | |
923072b8 | 196 | | |
b7449926 XL |
197 | |
198 | error: unnecessary parentheses around assigned value | |
29967ef6 | 199 | --> $DIR/lint-unnecessary-parens.rs:77:11 |
b7449926 | 200 | | |
532ac7d7 | 201 | LL | _a += (1); |
c295e0f8 XL |
202 | | ^ ^ |
203 | | | |
204 | help: remove these parentheses | |
205 | | | |
206 | LL - _a += (1); | |
207 | LL + _a += 1; | |
923072b8 | 208 | | |
b7449926 | 209 | |
f035d41b | 210 | error: aborting due to 17 previous errors |
b7449926 | 211 |