mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +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();
|
|
}
|