]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/issue-74702.stderr
53dcf97f81c6a4d765577e4c39525b9a16948f88
[rust.git] / src / test / ui / pattern / issue-74702.stderr
1 error: `foo @` is not allowed in a tuple
2   --> $DIR/issue-74702.rs:2:10
3    |
4 LL |     let (foo @ ..,) = (0, 0);
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 foo, discard the tuple's remaining fields
9    |
10 LL |     let (..,) = (0, 0);
11    |          ~~
12
13 error: `..` patterns are not allowed here
14   --> $DIR/issue-74702.rs:2:16
15    |
16 LL |     let (foo @ ..,) = (0, 0);
17    |                ^^
18    |
19    = note: only allowed in tuple, tuple struct, and slice patterns
20
21 error[E0308]: mismatched types
22   --> $DIR/issue-74702.rs:2:9
23    |
24 LL |     let (foo @ ..,) = (0, 0);
25    |         ^^^^^^^^^^^ expected a tuple with 2 elements, found one with 1 element
26    |
27    = note: expected tuple `({integer}, {integer})`
28               found tuple `(_,)`
29
30 error: aborting due to 3 previous errors
31
32 For more information about this error, try `rustc --explain E0308`.