1
Fork 0
rust/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr

37 lines
1.3 KiB
Text
Raw Normal View History

2019-07-09 08:44:56 +02:00
error: `..X` range patterns are not supported
--> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:10
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | [..9, 99..100, _] => {},
2019-07-09 08:44:56 +02:00
| ^^^ help: try using the minimum value for the type: `MIN..9`
2018-08-08 14:28:26 +02:00
2019-07-09 08:44:56 +02:00
error: arbitrary expressions aren't allowed in patterns
--> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:10
|
LL | [..9, 99..100, _] => {},
| ^^^
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:10
|
LL | [..9, 99..100, _] => {},
| ^^^ ranges require char or numeric types
|
= note: start type: [type error]
= note: end type: {integer}
error[E0308]: mismatched types
--> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:15
|
LL | match [5..4, 99..105, 43..44] {
| ----------------------- this match expression has type `std::ops::Range<{integer}>`
LL | [..9, 99..100, _] => {},
| ^^^^^^^ expected struct `std::ops::Range`, found integer
|
= note: expected type `std::ops::Range<{integer}>`
found type `{integer}`
error: aborting due to 4 previous errors
2018-08-08 14:28:26 +02:00
2019-07-09 08:44:56 +02:00
Some errors have detailed explanations: E0029, E0308.
For more information about an error, try `rustc --explain E0029`.