summaryrefslogtreecommitdiffstats
path: root/src/test/ui/array-slice-vec/issue-69103-extra-binding-subslice.stderr
blob: 9432e2f0c9d34fbf200fdbdd4815e01484d8e369 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
error: `..` can only be used once per slice pattern
  --> $DIR/issue-69103-extra-binding-subslice.rs:6:22
   |
LL |     let [a @ .., b @ ..] = &mut [1, 2];
   |              --      ^^ can only be used once per slice pattern
   |              |
   |              previously used here

error: `..` can only be used once per slice pattern
  --> $DIR/issue-69103-extra-binding-subslice.rs:10:18
   |
LL |     let [.., c @ ..] = [1, 2];
   |          --      ^^ can only be used once per slice pattern
   |          |
   |          previously used here

error: `..` patterns are not allowed here
  --> $DIR/issue-69103-extra-binding-subslice.rs:15:18
   |
LL |     let (.., d @ ..) = (1, 2);
   |                  ^^
   |
   = note: only allowed in tuple, tuple struct, and slice patterns

error: aborting due to 3 previous errors