rust/tests/ui/bogus-tag.rs
2023-01-11 09:32:08 +00:00

11 lines
290 B
Rust

enum Color { Rgb(isize, isize, isize), Rgba(isize, isize, isize, isize), }
fn main() {
let red: Color = Color::Rgb(255, 0, 0);
match red {
Color::Rgb(r, g, b) => { println!("rgb"); }
Color::Hsl(h, s, l) => { println!("hsl"); }
//~^ ERROR no variant
}
}