]> git.lizzy.rs Git - rust.git/blob - src/test/ui/destructuring-assignment/slice_destructure_fail.stderr
728687deb8bbbd96af66338f9708a5ead40e22cd
[rust.git] / src / test / ui / destructuring-assignment / slice_destructure_fail.stderr
1 error: `..` can only be used once per slice pattern
2   --> $DIR/slice_destructure_fail.rs:5:14
3    |
4 LL |   [a, .., b, ..] = [0, 1];
5    |       --     ^^ can only be used once per slice pattern
6    |       |
7    |       previously used here
8
9 error[E0527]: pattern requires 3 elements but array has 2
10   --> $DIR/slice_destructure_fail.rs:6:3
11    |
12 LL |   [a, a, b] = [1, 2];
13    |   ^^^^^^^^^ expected 2 elements
14
15 error: aborting due to 2 previous errors
16
17 For more information about this error, try `rustc --explain E0527`.