fork/rust

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

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

master
1.1 KiB37 linesraw
1error: `x @` is not allowed in a tuple struct
2  --> $DIR/issue-74539.rs:8:14
3   |
4LL |         E::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 |         E::A(..) => {
11   |              ~~
12
13error: `..` patterns are not allowed here
14  --> $DIR/issue-74539.rs:8:18
15   |
16LL |         E::A(x @ ..) => {
17   |                  ^^
18   |
19   = note: only allowed in tuple, tuple struct, and slice patterns
20
21error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
22  --> $DIR/issue-74539.rs:8:14
23   |
24LL |     A(u8, u8),
25   |       --  -- tuple variant has 2 fields
26...
27LL |         E::A(x @ ..) => {
28   |              ^^^^^^ expected 2 fields, found 1
29   |
30help: use `_` to explicitly ignore each field
31   |
32LL |         E::A(x @ .., _) => {
33   |                    +++
34
35error: aborting due to 3 previous errors
36
37For more information about this error, try `rustc --explain E0023`.