fork/rust

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

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

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