@@ -124,7 +124,7 @@ LL + return 1;
124
124
|
125
125
126
126
error: unnecessary parentheses around assigned value
127
- --> $DIR/lint-unnecessary-parens.rs:52 :31
127
+ --> $DIR/lint-unnecessary-parens.rs:74 :31
128
128
|
129
129
LL | pub const CONST_ITEM: usize = (10);
130
130
| ^ ^
@@ -136,7 +136,7 @@ LL + pub const CONST_ITEM: usize = 10;
136
136
|
137
137
138
138
error: unnecessary parentheses around assigned value
139
- --> $DIR/lint-unnecessary-parens.rs:53 :33
139
+ --> $DIR/lint-unnecessary-parens.rs:75 :33
140
140
|
141
141
LL | pub static STATIC_ITEM: usize = (10);
142
142
| ^ ^
@@ -148,7 +148,7 @@ LL + pub static STATIC_ITEM: usize = 10;
148
148
|
149
149
150
150
error: unnecessary parentheses around function argument
151
- --> $DIR/lint-unnecessary-parens.rs:57 :9
151
+ --> $DIR/lint-unnecessary-parens.rs:79 :9
152
152
|
153
153
LL | bar((true));
154
154
| ^ ^
@@ -160,7 +160,7 @@ LL + bar(true);
160
160
|
161
161
162
162
error: unnecessary parentheses around `if` condition
163
- --> $DIR/lint-unnecessary-parens.rs:59 :8
163
+ --> $DIR/lint-unnecessary-parens.rs:81 :8
164
164
|
165
165
LL | if (true) {}
166
166
| ^ ^
@@ -172,7 +172,7 @@ LL + if true {}
172
172
|
173
173
174
174
error: unnecessary parentheses around `while` condition
175
- --> $DIR/lint-unnecessary-parens.rs:60 :11
175
+ --> $DIR/lint-unnecessary-parens.rs:82 :11
176
176
|
177
177
LL | while (true) {}
178
178
| ^ ^
@@ -184,7 +184,7 @@ LL + while true {}
184
184
|
185
185
186
186
error: unnecessary parentheses around `match` scrutinee expression
187
- --> $DIR/lint-unnecessary-parens.rs:61 :11
187
+ --> $DIR/lint-unnecessary-parens.rs:83 :11
188
188
|
189
189
LL | match (true) {
190
190
| ^ ^
@@ -196,7 +196,7 @@ LL + match true {
196
196
|
197
197
198
198
error: unnecessary parentheses around `let` scrutinee expression
199
- --> $DIR/lint-unnecessary-parens.rs:64 :16
199
+ --> $DIR/lint-unnecessary-parens.rs:86 :16
200
200
|
201
201
LL | if let 1 = (1) {}
202
202
| ^ ^
@@ -208,7 +208,7 @@ LL + if let 1 = 1 {}
208
208
|
209
209
210
210
error: unnecessary parentheses around `let` scrutinee expression
211
- --> $DIR/lint-unnecessary-parens.rs:65 :19
211
+ --> $DIR/lint-unnecessary-parens.rs:87 :19
212
212
|
213
213
LL | while let 1 = (2) {}
214
214
| ^ ^
@@ -220,7 +220,7 @@ LL + while let 1 = 2 {}
220
220
|
221
221
222
222
error: unnecessary parentheses around method argument
223
- --> $DIR/lint-unnecessary-parens.rs:81 :24
223
+ --> $DIR/lint-unnecessary-parens.rs:103 :24
224
224
|
225
225
LL | X { y: false }.foo((true));
226
226
| ^ ^
@@ -232,7 +232,7 @@ LL + X { y: false }.foo(true);
232
232
|
233
233
234
234
error: unnecessary parentheses around assigned value
235
- --> $DIR/lint-unnecessary-parens.rs:83 :18
235
+ --> $DIR/lint-unnecessary-parens.rs:105 :18
236
236
|
237
237
LL | let mut _a = (0);
238
238
| ^ ^
@@ -244,7 +244,7 @@ LL + let mut _a = 0;
244
244
|
245
245
246
246
error: unnecessary parentheses around assigned value
247
- --> $DIR/lint-unnecessary-parens.rs:84 :10
247
+ --> $DIR/lint-unnecessary-parens.rs:106 :10
248
248
|
249
249
LL | _a = (0);
250
250
| ^ ^
@@ -256,7 +256,7 @@ LL + _a = 0;
256
256
|
257
257
258
258
error: unnecessary parentheses around assigned value
259
- --> $DIR/lint-unnecessary-parens.rs:85 :11
259
+ --> $DIR/lint-unnecessary-parens.rs:107 :11
260
260
|
261
261
LL | _a += (1);
262
262
| ^ ^
@@ -268,7 +268,7 @@ LL + _a += 1;
268
268
|
269
269
270
270
error: unnecessary parentheses around pattern
271
- --> $DIR/lint-unnecessary-parens.rs:87 :8
271
+ --> $DIR/lint-unnecessary-parens.rs:109 :8
272
272
|
273
273
LL | let(mut _a) = 3;
274
274
| ^ ^
@@ -280,7 +280,7 @@ LL + let mut _a = 3;
280
280
|
281
281
282
282
error: unnecessary parentheses around pattern
283
- --> $DIR/lint-unnecessary-parens.rs:88 :9
283
+ --> $DIR/lint-unnecessary-parens.rs:110 :9
284
284
|
285
285
LL | let (mut _a) = 3;
286
286
| ^ ^
@@ -292,7 +292,7 @@ LL + let mut _a = 3;
292
292
|
293
293
294
294
error: unnecessary parentheses around pattern
295
- --> $DIR/lint-unnecessary-parens.rs:89 :8
295
+ --> $DIR/lint-unnecessary-parens.rs:111 :8
296
296
|
297
297
LL | let( mut _a) = 3;
298
298
| ^^ ^
@@ -304,7 +304,7 @@ LL + let mut _a = 3;
304
304
|
305
305
306
306
error: unnecessary parentheses around pattern
307
- --> $DIR/lint-unnecessary-parens.rs:91 :8
307
+ --> $DIR/lint-unnecessary-parens.rs:113 :8
308
308
|
309
309
LL | let(_a) = 3;
310
310
| ^ ^
@@ -316,7 +316,7 @@ LL + let _a = 3;
316
316
|
317
317
318
318
error: unnecessary parentheses around pattern
319
- --> $DIR/lint-unnecessary-parens.rs:92 :9
319
+ --> $DIR/lint-unnecessary-parens.rs:114 :9
320
320
|
321
321
LL | let (_a) = 3;
322
322
| ^ ^
@@ -328,7 +328,7 @@ LL + let _a = 3;
328
328
|
329
329
330
330
error: unnecessary parentheses around pattern
331
- --> $DIR/lint-unnecessary-parens.rs:93 :8
331
+ --> $DIR/lint-unnecessary-parens.rs:115 :8
332
332
|
333
333
LL | let( _a) = 3;
334
334
| ^^ ^
@@ -339,5 +339,41 @@ LL - let( _a) = 3;
339
339
LL + let _a = 3;
340
340
|
341
341
342
- error: aborting due to 28 previous errors
342
+ error: unnecessary parentheses around block return value
343
+ --> $DIR/lint-unnecessary-parens.rs:121:9
344
+ |
345
+ LL | (unit!() - One)
346
+ | ^ ^
347
+ |
348
+ help: remove these parentheses
349
+ |
350
+ LL - (unit!() - One)
351
+ LL + unit!() - One
352
+ |
353
+
354
+ error: unnecessary parentheses around block return value
355
+ --> $DIR/lint-unnecessary-parens.rs:123:9
356
+ |
357
+ LL | (unit![] - One)
358
+ | ^ ^
359
+ |
360
+ help: remove these parentheses
361
+ |
362
+ LL - (unit![] - One)
363
+ LL + unit![] - One
364
+ |
365
+
366
+ error: unnecessary parentheses around block return value
367
+ --> $DIR/lint-unnecessary-parens.rs:126:9
368
+ |
369
+ LL | (unit! {} - One)
370
+ | ^ ^
371
+ |
372
+ help: remove these parentheses
373
+ |
374
+ LL - (unit! {} - One)
375
+ LL + unit! {} - One
376
+ |
377
+
378
+ error: aborting due to 31 previous errors
343
379
0 commit comments