Skip to content

Commit f6c8234

Browse files
committed
And also --bless those recovery tests.
1 parent 2411134 commit f6c8234

File tree

5 files changed

+150
-19
lines changed

5 files changed

+150
-19
lines changed
Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1-
error: unexpected token: `,`
2-
--> $DIR/exclusive_range_pattern_syntax_collision.rs:5:17
1+
error: `X..` range patterns are not supported
2+
--> $DIR/exclusive_range_pattern_syntax_collision.rs:5:13
33
|
44
LL | [_, 99.., _] => {},
5-
| ^
5+
| ^^^^ help: try using the maximum value for the type: `99..MAX`
66

7-
error: aborting due to previous error
7+
error: arbitrary expressions aren't allowed in patterns
8+
--> $DIR/exclusive_range_pattern_syntax_collision.rs:5:13
9+
|
10+
LL | [_, 99.., _] => {},
11+
| ^^^^
12+
13+
error[E0029]: only char and numeric types are allowed in range patterns
14+
--> $DIR/exclusive_range_pattern_syntax_collision.rs:5:13
15+
|
16+
LL | [_, 99.., _] => {},
17+
| ^^^^ ranges require char or numeric types
18+
|
19+
= note: start type: {integer}
20+
= note: end type: [type error]
21+
22+
error: aborting due to 3 previous errors
823

24+
For more information about this error, try `rustc --explain E0029`.
Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,31 @@
1-
error: unexpected token: `]`
2-
--> $DIR/exclusive_range_pattern_syntax_collision2.rs:5:17
1+
error: `X..` range patterns are not supported
2+
--> $DIR/exclusive_range_pattern_syntax_collision2.rs:5:13
33
|
44
LL | [_, 99..] => {},
5-
| ^
5+
| ^^^^ help: try using the maximum value for the type: `99..MAX`
66

7-
error: aborting due to previous error
7+
error: arbitrary expressions aren't allowed in patterns
8+
--> $DIR/exclusive_range_pattern_syntax_collision2.rs:5:13
9+
|
10+
LL | [_, 99..] => {},
11+
| ^^^^
12+
13+
error[E0527]: pattern requires 2 elements but array has 3
14+
--> $DIR/exclusive_range_pattern_syntax_collision2.rs:5:9
15+
|
16+
LL | [_, 99..] => {},
17+
| ^^^^^^^^^ expected 3 elements
18+
19+
error[E0029]: only char and numeric types are allowed in range patterns
20+
--> $DIR/exclusive_range_pattern_syntax_collision2.rs:5:13
21+
|
22+
LL | [_, 99..] => {},
23+
| ^^^^ ranges require char or numeric types
24+
|
25+
= note: start type: {integer}
26+
= note: end type: [type error]
27+
28+
error: aborting due to 4 previous errors
829

30+
Some errors have detailed explanations: E0029, E0527.
31+
For more information about an error, try `rustc --explain E0029`.
Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,36 @@
1-
error: expected one of `,` or `]`, found `9`
2-
--> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:12
1+
error: `..X` range patterns are not supported
2+
--> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:10
33
|
44
LL | [..9, 99..100, _] => {},
5-
| ^ expected one of `,` or `]` here
5+
| ^^^ help: try using the minimum value for the type: `MIN..9`
66

7-
error: aborting due to previous error
7+
error: arbitrary expressions aren't allowed in patterns
8+
--> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:10
9+
|
10+
LL | [..9, 99..100, _] => {},
11+
| ^^^
12+
13+
error[E0029]: only char and numeric types are allowed in range patterns
14+
--> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:10
15+
|
16+
LL | [..9, 99..100, _] => {},
17+
| ^^^ ranges require char or numeric types
18+
|
19+
= note: start type: [type error]
20+
= note: end type: {integer}
21+
22+
error[E0308]: mismatched types
23+
--> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:15
24+
|
25+
LL | match [5..4, 99..105, 43..44] {
26+
| ----------------------- this match expression has type `std::ops::Range<{integer}>`
27+
LL | [..9, 99..100, _] => {},
28+
| ^^^^^^^ expected struct `std::ops::Range`, found integer
29+
|
30+
= note: expected type `std::ops::Range<{integer}>`
31+
found type `{integer}`
32+
33+
error: aborting due to 4 previous errors
834

35+
Some errors have detailed explanations: E0029, E0308.
36+
For more information about an error, try `rustc --explain E0029`.

src/test/ui/parser/pat-tuple-4.stderr

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,40 @@
1-
error: expected one of `)` or `,`, found `pat`
1+
error: `..X` range patterns are not supported
2+
--> $DIR/pat-tuple-4.rs:3:10
3+
|
4+
LL | (.. pat) => {}
5+
| ^^^^^^ help: try using the minimum value for the type: `MIN..pat`
6+
7+
error: arbitrary expressions aren't allowed in patterns
8+
--> $DIR/pat-tuple-4.rs:3:10
9+
|
10+
LL | (.. pat) => {}
11+
| ^^^^^^
12+
13+
error[E0425]: cannot find value `pat` in this scope
214
--> $DIR/pat-tuple-4.rs:3:13
315
|
416
LL | (.. pat) => {}
5-
| ^^^ expected one of `)` or `,` here
17+
| ^^^ not found in this scope
18+
19+
error[E0658]: exclusive range pattern syntax is experimental
20+
--> $DIR/pat-tuple-4.rs:3:10
21+
|
22+
LL | (.. pat) => {}
23+
| ^^^^^^
24+
|
25+
= note: for more information, see https://github.com/rust-lang/rust/issues/37854
26+
= help: add #![feature(exclusive_range_pattern)] to the crate attributes to enable
27+
28+
error[E0029]: only char and numeric types are allowed in range patterns
29+
--> $DIR/pat-tuple-4.rs:3:10
30+
|
31+
LL | (.. pat) => {}
32+
| ^^^^^^ ranges require char or numeric types
33+
|
34+
= note: start type: [type error]
35+
= note: end type: [type error]
636

7-
error: aborting due to previous error
37+
error: aborting due to 5 previous errors
838

39+
Some errors have detailed explanations: E0029, E0425, E0658.
40+
For more information about an error, try `rustc --explain E0029`.

src/test/ui/parser/pat-tuple-5.stderr

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,40 @@
1-
error: unexpected token: `)`
2-
--> $DIR/pat-tuple-5.rs:3:16
1+
error: `X..` range patterns are not supported
2+
--> $DIR/pat-tuple-5.rs:3:10
33
|
44
LL | (pat ..) => {}
5-
| ^
5+
| ^^^^^^ help: try using the maximum value for the type: `pat..MAX`
66

7-
error: aborting due to previous error
7+
error: arbitrary expressions aren't allowed in patterns
8+
--> $DIR/pat-tuple-5.rs:3:10
9+
|
10+
LL | (pat ..) => {}
11+
| ^^^^^^
12+
13+
error[E0425]: cannot find value `pat` in this scope
14+
--> $DIR/pat-tuple-5.rs:3:10
15+
|
16+
LL | (pat ..) => {}
17+
| ^^^ not found in this scope
18+
19+
error[E0658]: exclusive range pattern syntax is experimental
20+
--> $DIR/pat-tuple-5.rs:3:10
21+
|
22+
LL | (pat ..) => {}
23+
| ^^^^^^
24+
|
25+
= note: for more information, see https://github.com/rust-lang/rust/issues/37854
26+
= help: add #![feature(exclusive_range_pattern)] to the crate attributes to enable
27+
28+
error[E0029]: only char and numeric types are allowed in range patterns
29+
--> $DIR/pat-tuple-5.rs:3:10
30+
|
31+
LL | (pat ..) => {}
32+
| ^^^^^^ ranges require char or numeric types
33+
|
34+
= note: start type: [type error]
35+
= note: end type: [type error]
36+
37+
error: aborting due to 5 previous errors
838

39+
Some errors have detailed explanations: E0029, E0425, E0658.
40+
For more information about an error, try `rustc --explain E0029`.

0 commit comments

Comments
 (0)