]> git.lizzy.rs Git - rust.git/blob - tests/ui/pattern/issue-72574-1.stderr
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / pattern / issue-72574-1.stderr
1 error: `_x @` is not allowed in a tuple
2   --> $DIR/issue-72574-1.rs:4:14
3    |
4 LL |         (_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 |         (_a, ..) => {}
11    |              ~~
12
13 error: `..` patterns are not allowed here
14   --> $DIR/issue-72574-1.rs:4:19
15    |
16 LL |         (_a, _x @ ..) => {}
17    |                   ^^
18    |
19    = note: only allowed in tuple, tuple struct, and slice patterns
20
21 error[E0308]: mismatched types
22   --> $DIR/issue-72574-1.rs:4:9
23    |
24 LL |     match x {
25    |           - this expression has type `({integer}, {integer}, {integer})`
26 LL |         (_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
32 error: aborting due to 3 previous errors
33
34 For more information about this error, try `rustc --explain E0308`.