]> git.proxmox.com Git - rustc.git/blame - src/test/ui/pattern/issue-74539.stderr
New upstream version 1.57.0+dfsg1
[rustc.git] / src / test / ui / pattern / issue-74539.stderr
CommitLineData
3dfed10e
XL
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(..) => {
94222f64 11 | ~~
3dfed10e
XL
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
94222f64 22 --> $DIR/issue-74539.rs:8:14
3dfed10e
XL
23 |
24LL | A(u8, u8),
94222f64 25 | -- -- tuple variant has 2 fields
3dfed10e
XL
26...
27LL | E::A(x @ ..) => {
94222f64 28 | ^^^^^^ expected 2 fields, found 1
5869c6ff
XL
29 |
30help: use `_` to explicitly ignore each field
31 |
32LL | E::A(x @ .., _) => {
94222f64 33 | +++
3dfed10e
XL
34
35error: aborting due to 3 previous errors
36
37For more information about this error, try `rustc --explain E0023`.