summary refs log tree commit diff
path: root/src/test/ui/destructuring-assignment/slice_destructure_fail.rs
blob: f636ea3511c2672090e8e08db4a2a4b2f6d9e25a (plain)
1
2
3
4
5
6
7
#![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
}