fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
798 B24 linesraw
1error: arbitrary expressions aren't allowed in patterns
2  --> $DIR/patkind-litrange-no-expr.rs:20:13
3   |
4LL |     Arith = 1 + 1,
5   |             ^^^^^
6
7error: arbitrary expressions aren't allowed in patterns
8  --> $DIR/patkind-litrange-no-expr.rs:20:13
9   |
10LL |     Arith = 1 + 1,
11   |             ^^^^^
12
13error[E0029]: only char and numeric types are allowed in range patterns
14  --> $DIR/patkind-litrange-no-expr.rs:20:13
15   |
16LL |                 $( $value ..= 42 => Some($name::$variant), )* // PatKind::Range
17   |                               -- this is of type `{integer}`
18...
19LL |     Arith = 1 + 1,
20   |             ^^^^^ this is of type `_` but it should be `char` or numeric
21
22error: aborting due to 3 previous errors
23
24For more information about this error, try `rustc --explain E0029`.