2018-08-08 07:28:26 -05:00
|
|
|
error[E0029]: only char and numeric types are allowed in range patterns
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/match-range-fail.rs:3:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | "bar" ..= "foo" => { }
|
|
|
|
| ^^^^^^^^^^^^^^^ ranges require char or numeric types
|
|
|
|
|
|
|
|
|
= note: start type: &'static str
|
|
|
|
= note: end type: &'static str
|
|
|
|
|
|
|
|
error[E0029]: only char and numeric types are allowed in range patterns
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/match-range-fail.rs:10:16
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | 10 ..= "what" => ()
|
|
|
|
| ^^^^^^ ranges require char or numeric types
|
|
|
|
|
|
|
|
|
= note: start type: {integer}
|
|
|
|
= note: end type: &'static str
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/match-range-fail.rs:17:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | 'c' ..= 100 => { }
|
2018-12-31 19:43:08 -06:00
|
|
|
| ^^^^^^^^^^^ expected integer, found char
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `{integer}`
|
|
|
|
found type `char`
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
2019-04-17 12:26:38 -05:00
|
|
|
Some errors have detailed explanations: E0029, E0308.
|
2018-08-08 07:28:26 -05:00
|
|
|
For more information about an error, try `rustc --explain E0029`.
|