File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ fn main() {
2222 match ( true ) { //~ ERROR unnecessary parentheses around `match` head expression
2323 _ => { }
2424 }
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
2727 let v = X { y : false } ;
2828 // struct lits needs parens, so these shouldn't warn.
2929 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
4040LL | match (true) {
4141 | ^^^^^^ help: remove these parentheses
4242
43- error: unnecessary parentheses around `if let` head expression
43+ error: unnecessary parentheses around `let` scrutinee
4444 --> $DIR/lint-unnecessary-parens.rs:25:16
4545 |
4646LL | if let 1 = (1) {}
4747 | ^^^ help: remove these parentheses
4848
49- error: unnecessary parentheses around `while let` head expression
49+ error: unnecessary parentheses around `let` scrutinee
5050 --> $DIR/lint-unnecessary-parens.rs:26:19
5151 |
5252LL | while let 1 = (2) {}
You can’t perform that action at this time.
0 commit comments