blob: 90d93892f7f2249f75155ca0e2ae1bfdfdd4fdec (
plain)
1
2
3
4
5
6
7
8
|
#![feature(destructuring_assignment)]
fn main() {
let (mut a, mut b);
[a, .., b, ..] = [0, 1]; //~ ERROR `..` can only be used once per slice pattern
[a, a, b] = [1, 2]; //~ ERROR pattern requires 3 elements but array has 2
[_] = [1, 2]; //~ ERROR pattern requires 1 element but array has 2
}
|