aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/match5.rs
blob: 6741ee8664ffc5efc571d9dd8fe42121e7569073 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
enum Foo {
    A,
    B,
    C(char),
    D { x: i64, y: i64 },
}

fn inspect(f: Foo) {
    match f {
        Foo::A => {}
        Foo::B => {}
        Foo::C(a) => {}
        Foo::D(x, y) => {} // { dg-error "expected tuple struct or tuple variant, found struct variant .Foo::D." }
    }
}