2018-08-08 14:28:26 +02:00
|
|
|
error: arbitrary expressions aren't allowed in patterns
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/patkind-litrange-no-expr.rs:20:13
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | Arith = 1 + 1,
|
2018-08-08 14:28:26 +02:00
|
|
|
| ^^^^^
|
|
|
|
|
|
2020-01-08 20:02:10 +03:00
|
|
|
error: arbitrary expressions aren't allowed in patterns
|
|
|
|
|
--> $DIR/patkind-litrange-no-expr.rs:20:13
|
|
|
|
|
|
|
|
|
|
|
LL | Arith = 1 + 1,
|
|
|
|
|
| ^^^^^
|
|
|
|
|
|
2018-08-08 14:28:26 +02:00
|
|
|
error[E0029]: only char and numeric types are allowed in range patterns
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/patkind-litrange-no-expr.rs:20:13
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-11-13 08:27:53 +09:00
|
|
|
LL | $( $value ..= 42 => Some($name::$variant), )* // PatKind::Range
|
|
|
|
|
| -- this is of type `{integer}`
|
|
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | Arith = 1 + 1,
|
2019-11-13 08:27:53 +09:00
|
|
|
| ^^^^^ this is of type `_` but it should be `char` or numeric
|
2018-08-08 14:28:26 +02:00
|
|
|
|
2020-01-08 20:02:10 +03:00
|
|
|
error: aborting due to 3 previous errors
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0029`.
|