Skip to content

Commit c7043d7

Browse files
committed
fixed tests
1 parent 3d37216 commit c7043d7

6 files changed

+14
-55
lines changed

tests/ui/parser/or-in-let-chain.edition2021.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ LL | if let true = true || false {}
55
| ^^
66

77
error: expected expression, found `let` statement
8-
--> $DIR/or-in-let-chain.rs:10:9
8+
--> $DIR/or-in-let-chain.rs:9:9
99
|
1010
LL | if (let true = true) || false {}
1111
| ^^^^^^^^^^^^^^^
1212
|
1313
= note: only supported directly in conditions of `if` and `while` expressions
1414

1515
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
1717
|
1818
LL | if let true = true || false || true {}
1919
| ^^
2020

2121
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
2323
|
2424
LL | if let true = true && false || true {}
2525
| ^^

tests/ui/parser/or-in-let-chain.edition2024.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ LL | if let true = true || false {}
55
| ^^
66

77
error: expected expression, found `let` statement
8-
--> $DIR/or-in-let-chain.rs:10:9
8+
--> $DIR/or-in-let-chain.rs:9:9
99
|
1010
LL | if (let true = true) || false {}
1111
| ^^^^^^^^^^^^^^^
1212
|
1313
= note: only supported directly in conditions of `if` and `while` expressions
1414

1515
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
1717
|
1818
LL | if let true = true || false || true {}
1919
| ^^
2020

2121
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
2323
|
2424
LL | if let true = true && false || true {}
2525
| ^^

tests/ui/rfcs/rfc-2497-if-let-chains/ast-validate-guards.stderr

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
error: `||` 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

67
error: module cannot be declared unsafe
78
--> $DIR/ast-validate-guards.rs:15:17

tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.feature.stderr

+2-16
Original file line numberDiff line numberDiff 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
|
285278
LL | 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
|
498484
LL | while true || let 0 = 0 {}

tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.no_feature.stderr

+2-16
Original file line numberDiff line numberDiff 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
|
285278
LL | 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
|
498484
LL | while true || let 0 = 0 {}

tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.nothing.stderr

+2-16
Original file line numberDiff line numberDiff 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
|
285278
LL | 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
|
498484
LL | while true || let 0 = 0 {}

0 commit comments

Comments
 (0)