summaryrefslogtreecommitdiffstats
path: root/src/test/ui/match/match-pattern-field-mismatch-2.rs
blob: fa03cdac29fc24c36afde881a4d201d08ac20d57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
fn main() {
    enum Color {
        Rgb(usize, usize, usize),
        Cmyk(usize, usize, usize, usize),
        NoColor,
    }

    fn foo(c: Color) {
        match c {
          Color::Rgb(_, _, _) => { }
          Color::Cmyk(_, _, _, _) => { }
          Color::NoColor(_) => { }
          //~^ ERROR expected tuple struct or tuple variant, found unit variant `Color::NoColor`
        }
    }
}