@@ -4,6 +4,7 @@ error: expected expression, found `let` statement
44LL | () if (let 0 = 1) => {}
55 | ^^^^^^^^^
66 |
7+ = note: only supported directly in conditions of `if` and `while` expressions
78note: `let`s wrapped in parentheses are not supported in a context with let chains
89 --> $DIR/feature-gate.rs:10:16
910 |
@@ -16,6 +17,7 @@ error: expected expression, found `let` statement
1617LL | () if (((let 0 = 1))) => {}
1718 | ^^^^^^^^^
1819 |
20+ = note: only supported directly in conditions of `if` and `while` expressions
1921note: `let`s wrapped in parentheses are not supported in a context with let chains
2022 --> $DIR/feature-gate.rs:13:18
2123 |
@@ -28,6 +30,7 @@ error: expected expression, found `let` statement
2830LL | () if (let 0 = 1) && true => {}
2931 | ^^^^^^^^^
3032 |
33+ = note: only supported directly in conditions of `if` and `while` expressions
3134note: `let`s wrapped in parentheses are not supported in a context with let chains
3235 --> $DIR/feature-gate.rs:24:16
3336 |
@@ -40,6 +43,7 @@ error: expected expression, found `let` statement
4043LL | () if true && (let 0 = 1) => {}
4144 | ^^^^^^^^^
4245 |
46+ = note: only supported directly in conditions of `if` and `while` expressions
4347note: `let`s wrapped in parentheses are not supported in a context with let chains
4448 --> $DIR/feature-gate.rs:27:24
4549 |
@@ -52,6 +56,7 @@ error: expected expression, found `let` statement
5256LL | () if (let 0 = 1) && (let 0 = 1) => {}
5357 | ^^^^^^^^^
5458 |
59+ = note: only supported directly in conditions of `if` and `while` expressions
5560note: `let`s wrapped in parentheses are not supported in a context with let chains
5661 --> $DIR/feature-gate.rs:30:16
5762 |
@@ -64,6 +69,7 @@ error: expected expression, found `let` statement
6469LL | () if (let 0 = 1) && (let 0 = 1) => {}
6570 | ^^^^^^^^^
6671 |
72+ = note: only supported directly in conditions of `if` and `while` expressions
6773note: `let`s wrapped in parentheses are not supported in a context with let chains
6874 --> $DIR/feature-gate.rs:30:31
6975 |
@@ -76,6 +82,7 @@ error: expected expression, found `let` statement
7682LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
7783 | ^^^^^^^^^
7884 |
85+ = note: only supported directly in conditions of `if` and `while` expressions
7986note: `let`s wrapped in parentheses are not supported in a context with let chains
8087 --> $DIR/feature-gate.rs:34:42
8188 |
@@ -88,6 +95,7 @@ error: expected expression, found `let` statement
8895LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
8996 | ^^^^^^^^^
9097 |
98+ = note: only supported directly in conditions of `if` and `while` expressions
9199note: `let`s wrapped in parentheses are not supported in a context with let chains
92100 --> $DIR/feature-gate.rs:34:42
93101 |
@@ -100,6 +108,7 @@ error: expected expression, found `let` statement
100108LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
101109 | ^^^^^^^^^
102110 |
111+ = note: only supported directly in conditions of `if` and `while` expressions
103112note: `let`s wrapped in parentheses are not supported in a context with let chains
104113 --> $DIR/feature-gate.rs:34:42
105114 |
@@ -111,12 +120,16 @@ error: expected expression, found `let` statement
111120 |
112121LL | use_expr!((let 0 = 1 && 0 == 0));
113122 | ^^^
123+ |
124+ = note: only supported directly in conditions of `if` and `while` expressions
114125
115126error: expected expression, found `let` statement
116127 --> $DIR/feature-gate.rs:62:16
117128 |
118129LL | use_expr!((let 0 = 1));
119130 | ^^^
131+ |
132+ = note: only supported directly in conditions of `if` and `while` expressions
120133
121134error: no rules expected the token `let`
122135 --> $DIR/feature-gate.rs:70:15
0 commit comments