]> git.lizzy.rs Git - rust.git/blob - tests/ui/array-slice-vec/issue-69103-extra-binding-subslice.stderr
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
[rust.git] / tests / ui / array-slice-vec / issue-69103-extra-binding-subslice.stderr
1 error: `..` can only be used once per slice pattern
2   --> $DIR/issue-69103-extra-binding-subslice.rs:6:22
3    |
4 LL |     let [a @ .., b @ ..] = &mut [1, 2];
5    |              --      ^^ can only be used once per slice pattern
6    |              |
7    |              previously used here
8
9 error: `..` can only be used once per slice pattern
10   --> $DIR/issue-69103-extra-binding-subslice.rs:10:18
11    |
12 LL |     let [.., c @ ..] = [1, 2];
13    |          --      ^^ can only be used once per slice pattern
14    |          |
15    |          previously used here
16
17 error: `..` patterns are not allowed here
18   --> $DIR/issue-69103-extra-binding-subslice.rs:15:18
19    |
20 LL |     let (.., d @ ..) = (1, 2);
21    |                  ^^
22    |
23    = note: only allowed in tuple, tuple struct, and slice patterns
24
25 error: aborting due to 3 previous errors
26