mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
17 lines
268 B
Rust
17 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();
|
|
}
|