File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ fn main() {
22
22
match ( true ) { //~ ERROR unnecessary parentheses around `match` head expression
23
23
_ => { }
24
24
}
25
- if let 1 = ( 1 ) { } //~ ERROR unnecessary parentheses around `if let` head expression
26
- while let 1 = ( 2 ) { } //~ ERROR unnecessary parentheses around `while let` head expression
25
+ if let 1 = ( 1 ) { } //~ ERROR unnecessary parentheses around `let` scrutinee
26
+ while let 1 = ( 2 ) { } //~ ERROR unnecessary parentheses around `let` scrutinee
27
27
let v = X { y : false } ;
28
28
// struct lits needs parens, so these shouldn't warn.
29
29
if ( v == X { y : true } ) { }
Original file line number Diff line number Diff line change @@ -40,13 +40,13 @@ error: unnecessary parentheses around `match` head expression
40
40
LL | match (true) {
41
41
| ^^^^^^ help: remove these parentheses
42
42
43
- error: unnecessary parentheses around `if let` head expression
43
+ error: unnecessary parentheses around `let` scrutinee
44
44
--> $DIR/lint-unnecessary-parens.rs:25:16
45
45
|
46
46
LL | if let 1 = (1) {}
47
47
| ^^^ help: remove these parentheses
48
48
49
- error: unnecessary parentheses around `while let` head expression
49
+ error: unnecessary parentheses around `let` scrutinee
50
50
--> $DIR/lint-unnecessary-parens.rs:26:19
51
51
|
52
52
LL | while let 1 = (2) {}
You can’t perform that action at this time.
0 commit comments