]> git.lizzy.rs Git - rust.git/blob - src/test/ui/match/match-pattern-field-mismatch.rs
Make some diagnostics not depend on the source of what they reference being available
[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 }