rust/src/test/ui/issues/issue-28971.rs
2019-04-09 14:19:20 -04:00

16 lines
283 B
Rust

enum Foo {
Bar(u8)
}
fn main(){
foo(|| {
match Foo::Bar(1) {
Foo::Baz(..) => (),
//~^ ERROR no variant or associated item named `Baz` found for type `Foo`
_ => (),
}
});
}
fn foo<F>(f: F) where F: FnMut() {
f();
}