mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
17 lines
398 B
Rust
17 lines
398 B
Rust
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`
|
|
}
|
|
}
|
|
}
|