mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
16 lines
268 B
Rust
16 lines
268 B
Rust
enum Foo {
|
|
Bar(u8)
|
|
}
|
|
fn main(){
|
|
foo(|| {
|
|
match Foo::Bar(1) {
|
|
Foo::Baz(..) => (),
|
|
//~^ ERROR no variant or associated item named `Baz` found
|
|
_ => (),
|
|
}
|
|
});
|
|
}
|
|
|
|
fn foo<F>(f: F) where F: FnMut() {
|
|
f();
|
|
}
|