]> git.proxmox.com Git - rustc.git/blob - tests/ui/destructuring-assignment/slice_destructure_fail.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / destructuring-assignment / slice_destructure_fail.rs
1 fn main() {
2 let (mut a, mut b);
3 [a, .., b, ..] = [0, 1]; //~ ERROR `..` can only be used once per slice pattern
4 [a, a, b] = [1, 2]; //~ ERROR pattern requires 3 elements but array has 2
5 [_] = [1, 2]; //~ ERROR pattern requires 1 element but array has 2
6 }