1 An array without a fixed length was pattern-matched.
3 Example of erroneous code:
6 #![feature(const_generics)]
8 fn is_123<const N: usize>(x: [u32; N]) -> bool {
10 [1, 2, ..] => true, // error: cannot pattern-match on an
11 // array without a fixed length
17 Ensure that the pattern is consistent with the size of the matched
18 array. Additional elements can be matched with `..`:
21 let r = &[1, 2, 3, 4];
23 &[a, b, ..] => { // ok!
24 println!("a={}, b={}", a, b);