summary refs log tree commit diff
path: root/src/test/ui/issues/issue-28971.rs
blob: 3f0d2fafb04781edcdd502fe71da86c2ff27c165 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// 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();
}