]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/issue-72574-2.stderr
Auto merge of #100845 - timvermeulen:iter_compare, r=scottmcm
[rust.git] / src / test / ui / pattern / issue-72574-2.stderr
1 error: `_x @` is not allowed in a tuple struct
2   --> $DIR/issue-72574-2.rs:6:20
3    |
4 LL |         Binder(_a, _x @ ..) => {}
5    |                    ^^^^^^^ this is only allowed in slice patterns
6    |
7    = help: remove this and bind each tuple field independently
8 help: if you don't need to use the contents of _x, discard the tuple's remaining fields
9    |
10 LL |         Binder(_a, ..) => {}
11    |                    ~~
12
13 error: `..` patterns are not allowed here
14   --> $DIR/issue-72574-2.rs:6:25
15    |
16 LL |         Binder(_a, _x @ ..) => {}
17    |                         ^^
18    |
19    = note: only allowed in tuple, tuple struct, and slice patterns
20
21 error[E0023]: this pattern has 2 fields, but the corresponding tuple struct has 3 fields
22   --> $DIR/issue-72574-2.rs:6:16
23    |
24 LL | struct Binder(i32, i32, i32);
25    |               ---  ---  --- tuple struct has 3 fields
26 ...
27 LL |         Binder(_a, _x @ ..) => {}
28    |                ^^  ^^^^^^^ expected 3 fields, found 2
29    |
30 help: use `_` to explicitly ignore each field
31    |
32 LL |         Binder(_a, _x @ .., _) => {}
33    |                           +++
34
35 error: aborting due to 3 previous errors
36
37 For more information about this error, try `rustc --explain E0023`.