rust/src/test/ui/issues/issue-28971.rs
2018-12-25 21:08:33 -07:00

19 lines
297 B
Rust

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