summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-32004.rs
blob: b3493508c5a9fb3e535aee1d1001d190ca84c8bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
enum Foo {
    Bar(i32),
    Baz
}

struct S;

fn main() {
    match Foo::Baz {
        Foo::Bar => {}
        //~^ ERROR expected unit struct, unit variant or constant, found tuple variant `Foo::Bar`
        _ => {}
    }

    match S {
        S(()) => {}
        //~^ ERROR expected tuple struct or tuple variant, found unit struct `S`
    }
}