blob: 2e24f6a5c899c69ef309465b2df166135a7ce3e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
fn main() {
enum color {
rgb(uint, uint, uint),
cmyk(uint, uint, uint, uint),
no_color,
}
fn foo(c: color) {
alt c {
rgb(_, _) { }
//~^ ERROR this pattern has 2 fields, but the corresponding variant has 3 fields
cmyk(_, _, _, _) { }
no_color { }
}
}
}
|