File tree Expand file tree Collapse file tree 6 files changed +14
-55
lines changed
rfcs/rfc-2497-if-let-chains Expand file tree Collapse file tree 6 files changed +14
-55
lines changed Original file line number Diff line number Diff line change @@ -5,21 +5,21 @@ LL | if let true = true || false {}
55 | ^^
66
77error: expected expression, found `let` statement
8- --> $DIR/or-in-let-chain.rs:10 :9
8+ --> $DIR/or-in-let-chain.rs:9 :9
99 |
1010LL | if (let true = true) || false {}
1111 | ^^^^^^^^^^^^^^^
1212 |
1313 = note: only supported directly in conditions of `if` and `while` expressions
1414
1515error: `||` operators are not supported in let chain conditions
16- --> $DIR/or-in-let-chain.rs:14 :24
16+ --> $DIR/or-in-let-chain.rs:12 :24
1717 |
1818LL | if let true = true || false || true {}
1919 | ^^
2020
2121error: `||` operators are not supported in let chain conditions
22- --> $DIR/or-in-let-chain.rs:18 :33
22+ --> $DIR/or-in-let-chain.rs:15 :33
2323 |
2424LL | if let true = true && false || true {}
2525 | ^^
Original file line number Diff line number Diff line change @@ -5,21 +5,21 @@ LL | if let true = true || false {}
55 | ^^
66
77error: expected expression, found `let` statement
8- --> $DIR/or-in-let-chain.rs:10 :9
8+ --> $DIR/or-in-let-chain.rs:9 :9
99 |
1010LL | if (let true = true) || false {}
1111 | ^^^^^^^^^^^^^^^
1212 |
1313 = note: only supported directly in conditions of `if` and `while` expressions
1414
1515error: `||` operators are not supported in let chain conditions
16- --> $DIR/or-in-let-chain.rs:14 :24
16+ --> $DIR/or-in-let-chain.rs:12 :24
1717 |
1818LL | if let true = true || false || true {}
1919 | ^^
2020
2121error: `||` operators are not supported in let chain conditions
22- --> $DIR/or-in-let-chain.rs:18 :33
22+ --> $DIR/or-in-let-chain.rs:15 :33
2323 |
2424LL | if let true = true && false || true {}
2525 | ^^
Original file line number Diff line number Diff line change 11error: `||` operators are not supported in let chain conditions
22 --> $DIR/ast-validate-guards.rs:5:38
33 |
4- LL | Ok(opt) if let Some(4) = opt || false => {} ^^
4+ LL | Ok(opt) if let Some(4) = opt || false => {}
5+ | ^^
56
67error: module cannot be declared unsafe
78 --> $DIR/ast-validate-guards.rs:15:17
Original file line number Diff line number Diff line change @@ -272,14 +272,7 @@ LL | if (let 0 = 0)? {}
272272 |
273273 = note: only supported directly in conditions of `if` and `while` expressions
274274
275- error: expected expression, found `let` statement
276- --> $DIR/disallowed-positions.rs:121:16
277- |
278- LL | if true || let 0 = 0 {}
279- | ^^^^^^^^^
280- |
281- = note: only supported directly in conditions of `if` and `while` expressions
282- note: `||` operators are not supported in let chain expressions
275+ error: `||` operators are not supported in let chain conditions
283276 --> $DIR/disallowed-positions.rs:121:13
284277 |
285278LL | if true || let 0 = 0 {}
@@ -485,14 +478,7 @@ LL | while (let 0 = 0)? {}
485478 |
486479 = note: only supported directly in conditions of `if` and `while` expressions
487480
488- error: expected expression, found `let` statement
489- --> $DIR/disallowed-positions.rs:212:19
490- |
491- LL | while true || let 0 = 0 {}
492- | ^^^^^^^^^
493- |
494- = note: only supported directly in conditions of `if` and `while` expressions
495- note: `||` operators are not supported in let chain expressions
481+ error: `||` operators are not supported in let chain conditions
496482 --> $DIR/disallowed-positions.rs:212:16
497483 |
498484LL | while true || let 0 = 0 {}
Original file line number Diff line number Diff line change @@ -272,14 +272,7 @@ LL | if (let 0 = 0)? {}
272272 |
273273 = note: only supported directly in conditions of `if` and `while` expressions
274274
275- error: expected expression, found `let` statement
276- --> $DIR/disallowed-positions.rs:121:16
277- |
278- LL | if true || let 0 = 0 {}
279- | ^^^^^^^^^
280- |
281- = note: only supported directly in conditions of `if` and `while` expressions
282- note: `||` operators are not supported in let chain expressions
275+ error: `||` operators are not supported in let chain conditions
283276 --> $DIR/disallowed-positions.rs:121:13
284277 |
285278LL | if true || let 0 = 0 {}
@@ -485,14 +478,7 @@ LL | while (let 0 = 0)? {}
485478 |
486479 = note: only supported directly in conditions of `if` and `while` expressions
487480
488- error: expected expression, found `let` statement
489- --> $DIR/disallowed-positions.rs:212:19
490- |
491- LL | while true || let 0 = 0 {}
492- | ^^^^^^^^^
493- |
494- = note: only supported directly in conditions of `if` and `while` expressions
495- note: `||` operators are not supported in let chain expressions
481+ error: `||` operators are not supported in let chain conditions
496482 --> $DIR/disallowed-positions.rs:212:16
497483 |
498484LL | while true || let 0 = 0 {}
Original file line number Diff line number Diff line change @@ -272,14 +272,7 @@ LL | if (let 0 = 0)? {}
272272 |
273273 = note: only supported directly in conditions of `if` and `while` expressions
274274
275- error: expected expression, found `let` statement
276- --> $DIR/disallowed-positions.rs:121:16
277- |
278- LL | if true || let 0 = 0 {}
279- | ^^^^^^^^^
280- |
281- = note: only supported directly in conditions of `if` and `while` expressions
282- note: `||` operators are not supported in let chain expressions
275+ error: `||` operators are not supported in let chain conditions
283276 --> $DIR/disallowed-positions.rs:121:13
284277 |
285278LL | if true || let 0 = 0 {}
@@ -485,14 +478,7 @@ LL | while (let 0 = 0)? {}
485478 |
486479 = note: only supported directly in conditions of `if` and `while` expressions
487480
488- error: expected expression, found `let` statement
489- --> $DIR/disallowed-positions.rs:212:19
490- |
491- LL | while true || let 0 = 0 {}
492- | ^^^^^^^^^
493- |
494- = note: only supported directly in conditions of `if` and `while` expressions
495- note: `||` operators are not supported in let chain expressions
481+ error: `||` operators are not supported in let chain conditions
496482 --> $DIR/disallowed-positions.rs:212:16
497483 |
498484LL | while true || let 0 = 0 {}
You can’t perform that action at this time.
0 commit comments