2017-12-10 14:29:24 -06:00
|
|
|
enum Foo {
|
2015-10-11 15:44:55 -05:00
|
|
|
Bar(u8)
|
|
|
|
}
|
|
|
|
fn main(){
|
|
|
|
foo(|| {
|
|
|
|
match Foo::Bar(1) {
|
2017-11-15 20:55:45 -06:00
|
|
|
Foo::Baz(..) => (),
|
2020-01-08 10:05:31 -06:00
|
|
|
//~^ ERROR no variant or associated item named `Baz` found
|
2015-10-11 15:44:55 -05:00
|
|
|
_ => (),
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
fn foo<F>(f: F) where F: FnMut() {
|
|
|
|
f();
|
|
|
|
}
|