File tree 6 files changed +14
-55
lines changed
rfcs/rfc-2497-if-let-chains
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 {}
5
5
| ^^
6
6
7
7
error: expected expression, found `let` statement
8
- --> $DIR/or-in-let-chain.rs:10 :9
8
+ --> $DIR/or-in-let-chain.rs:9 :9
9
9
|
10
10
LL | if (let true = true) || false {}
11
11
| ^^^^^^^^^^^^^^^
12
12
|
13
13
= note: only supported directly in conditions of `if` and `while` expressions
14
14
15
15
error: `||` 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
17
17
|
18
18
LL | if let true = true || false || true {}
19
19
| ^^
20
20
21
21
error: `||` 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
23
23
|
24
24
LL | if let true = true && false || true {}
25
25
| ^^
Original file line number Diff line number Diff line change @@ -5,21 +5,21 @@ LL | if let true = true || false {}
5
5
| ^^
6
6
7
7
error: expected expression, found `let` statement
8
- --> $DIR/or-in-let-chain.rs:10 :9
8
+ --> $DIR/or-in-let-chain.rs:9 :9
9
9
|
10
10
LL | if (let true = true) || false {}
11
11
| ^^^^^^^^^^^^^^^
12
12
|
13
13
= note: only supported directly in conditions of `if` and `while` expressions
14
14
15
15
error: `||` 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
17
17
|
18
18
LL | if let true = true || false || true {}
19
19
| ^^
20
20
21
21
error: `||` 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
23
23
|
24
24
LL | if let true = true && false || true {}
25
25
| ^^
Original file line number Diff line number Diff line change 1
1
error: `||` operators are not supported in let chain conditions
2
2
--> $DIR/ast-validate-guards.rs:5:38
3
3
|
4
- LL | Ok(opt) if let Some(4) = opt || false => {} ^^
4
+ LL | Ok(opt) if let Some(4) = opt || false => {}
5
+ | ^^
5
6
6
7
error: module cannot be declared unsafe
7
8
--> $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)? {}
272
272
|
273
273
= note: only supported directly in conditions of `if` and `while` expressions
274
274
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
283
276
--> $DIR/disallowed-positions.rs:121:13
284
277
|
285
278
LL | if true || let 0 = 0 {}
@@ -485,14 +478,7 @@ LL | while (let 0 = 0)? {}
485
478
|
486
479
= note: only supported directly in conditions of `if` and `while` expressions
487
480
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
496
482
--> $DIR/disallowed-positions.rs:212:16
497
483
|
498
484
LL | while true || let 0 = 0 {}
Original file line number Diff line number Diff line change @@ -272,14 +272,7 @@ LL | if (let 0 = 0)? {}
272
272
|
273
273
= note: only supported directly in conditions of `if` and `while` expressions
274
274
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
283
276
--> $DIR/disallowed-positions.rs:121:13
284
277
|
285
278
LL | if true || let 0 = 0 {}
@@ -485,14 +478,7 @@ LL | while (let 0 = 0)? {}
485
478
|
486
479
= note: only supported directly in conditions of `if` and `while` expressions
487
480
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
496
482
--> $DIR/disallowed-positions.rs:212:16
497
483
|
498
484
LL | while true || let 0 = 0 {}
Original file line number Diff line number Diff line change @@ -272,14 +272,7 @@ LL | if (let 0 = 0)? {}
272
272
|
273
273
= note: only supported directly in conditions of `if` and `while` expressions
274
274
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
283
276
--> $DIR/disallowed-positions.rs:121:13
284
277
|
285
278
LL | if true || let 0 = 0 {}
@@ -485,14 +478,7 @@ LL | while (let 0 = 0)? {}
485
478
|
486
479
= note: only supported directly in conditions of `if` and `while` expressions
487
480
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
496
482
--> $DIR/disallowed-positions.rs:212:16
497
483
|
498
484
LL | while true || let 0 = 0 {}
You can’t perform that action at this time.
0 commit comments