]> git.lizzy.rs Git - rust.git/blob - src/test/ui/match/match-pattern-field-mismatch.rs
Merge commit '57b3c4b90f4346b3990c1be387c3b3ca7b78412c' into clippyup
[rust.git] / src / test / ui / match / match-pattern-field-mismatch.rs
1 fn main() {
2     enum Color {
3         Rgb(usize, usize, usize),
4         Cmyk(usize, usize, usize, usize),
5         NoColor,
6     }
7
8     fn foo(c: Color) {
9         match c {
10           Color::Rgb(_, _) => { }
11           //~^ ERROR this pattern has 2 fields, but the corresponding tuple variant has 3
12           Color::Cmyk(_, _, _, _) => { }
13           Color::NoColor => { }
14         }
15     }
16 }