fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.1 KiB34 linesraw
1error: `_x @` is not allowed in a tuple
2  --> $DIR/issue-72574-1.rs:4:14
3   |
4LL |         (_a, _x @ ..) => {}
5   |              ^^^^^^^ this is only allowed in slice patterns
6   |
7   = help: remove this and bind each tuple field independently
8help: if you don't need to use the contents of _x, discard the tuple's remaining fields
9   |
10LL |         (_a, ..) => {}
11   |              ~~
12
13error: `..` patterns are not allowed here
14  --> $DIR/issue-72574-1.rs:4:19
15   |
16LL |         (_a, _x @ ..) => {}
17   |                   ^^
18   |
19   = note: only allowed in tuple, tuple struct, and slice patterns
20
21error[E0308]: mismatched types
22  --> $DIR/issue-72574-1.rs:4:9
23   |
24LL |     match x {
25   |           - this expression has type `({integer}, {integer}, {integer})`
26LL |         (_a, _x @ ..) => {}
27   |         ^^^^^^^^^^^^^ expected a tuple with 3 elements, found one with 2 elements
28   |
29   = note: expected tuple `({integer}, {integer}, {integer})`
30              found tuple `(_, _)`
31
32error: aborting due to 3 previous errors
33
34For more information about this error, try `rustc --explain E0308`.