struct Foo { v: Vec, } fn f(foo: &Foo) { match foo { Foo { v: [1, 2] } => {} //~^ ERROR expected an array or slice, found `Vec _ => {} } } fn main() {}