@@ -4,20 +4,16 @@ error: `..X` range patterns are not supported
4
4
LL | [..9, 99..100, _] => {},
5
5
| ^^^ help: try using the minimum value for the type: `MIN..9`
6
6
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
7
+ error[E0308]: mismatched types
14
8
--> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:10
15
9
|
10
+ LL | match [5..4, 99..105, 43..44] {
11
+ | ----------------------- this match expression has type `std::ops::Range<{integer}>`
16
12
LL | [..9, 99..100, _] => {},
17
- | ^^^ ranges require char or numeric types
13
+ | ^^^ expected struct `std::ops::Range`, found integer
18
14
|
19
- = note: start type: [type error]
20
- = note: end type: {integer}
15
+ = note: expected type `std::ops::Range<{integer}>`
16
+ found type ` {integer}`
21
17
22
18
error[E0308]: mismatched types
23
19
--> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:15
@@ -30,7 +26,6 @@ LL | [..9, 99..100, _] => {},
30
26
= note: expected type `std::ops::Range<{integer}>`
31
27
found type `{integer}`
32
28
33
- error: aborting due to 4 previous errors
29
+ error: aborting due to 3 previous errors
34
30
35
- Some errors have detailed explanations: E0029, E0308.
36
- For more information about an error, try `rustc --explain E0029`.
31
+ For more information about this error, try `rustc --explain E0308`.
0 commit comments