rust/src/test/ui/suggestions/pattern-struct-with-slice-vec-field.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
200 B
Rust
Raw Normal View History

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