2020-09-15 19:34:58 +00:00
|
|
|
error[E0029]: only `char` and numeric types are allowed in range patterns
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/match-range-fail.rs:3:9
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | "bar" ..= "foo" => { }
|
2019-11-12 23:27:53 +00:00
|
|
|
| -----^^^^^-----
|
|
|
|
| | |
|
|
|
|
| | this is of type `&'static str` but it should be `char` or numeric
|
|
|
|
| this is of type `&'static str` but it should be `char` or numeric
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2020-09-15 19:34:58 +00:00
|
|
|
error[E0029]: only `char` and numeric types are allowed in range patterns
|
2019-11-12 23:27:53 +00:00
|
|
|
--> $DIR/match-range-fail.rs:8:16
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | 10 ..= "what" => ()
|
2019-11-12 23:27:53 +00:00
|
|
|
| -- ^^^^^^ this is of type `&'static str` but it should be `char` or numeric
|
|
|
|
| |
|
|
|
|
| this is of type `{integer}`
|
|
|
|
|
2020-09-15 19:34:58 +00:00
|
|
|
error[E0029]: only `char` and numeric types are allowed in range patterns
|
2019-11-12 23:27:53 +00:00
|
|
|
--> $DIR/match-range-fail.rs:13:9
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-11-12 23:27:53 +00:00
|
|
|
LL | true ..= "what" => {}
|
|
|
|
| ----^^^^^------
|
|
|
|
| | |
|
|
|
|
| | this is of type `&'static str` but it should be `char` or numeric
|
|
|
|
| this is of type `bool` but it should be `char` or numeric
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2019-11-12 23:27:53 +00:00
|
|
|
--> $DIR/match-range-fail.rs:18:9
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2021-12-15 23:16:21 +00:00
|
|
|
LL | match 5 {
|
|
|
|
| - this expression has type `{integer}`
|
2018-08-08 12:28:26 +00:00
|
|
|
LL | 'c' ..= 100 => { }
|
2019-12-13 22:33:58 +00:00
|
|
|
| ^^^ --- this is of type `{integer}`
|
|
|
|
| |
|
|
|
|
| expected integer, found `char`
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2019-11-12 23:27:53 +00:00
|
|
|
error: aborting due to 4 previous errors
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2019-04-17 17:26:38 +00:00
|
|
|
Some errors have detailed explanations: E0029, E0308.
|
2018-08-08 12:28:26 +00:00
|
|
|
For more information about an error, try `rustc --explain E0029`.
|