rust/src/test/ui/pattern/patkind-litrange-no-expr.stderr

19 lines
540 B
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error: arbitrary expressions aren't allowed in patterns
2018-12-25 09:56:47 -06:00
--> $DIR/patkind-litrange-no-expr.rs:20:13
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | Arith = 1 + 1,
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/patkind-litrange-no-expr.rs:20:13
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | Arith = 1 + 1,
2018-08-08 07:28:26 -05:00
| ^^^^^ ranges require char or numeric types
|
= note: start type: {integer}
= note: end type: {integer}
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0029`.