rust/tests/ui/bogus-tag.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
290 B
Rust
Raw Normal View History

enum Color { Rgb(isize, isize, isize), Rgba(isize, isize, isize, isize), }
2010-06-23 21:03:09 -07:00
2011-07-27 14:19:39 +02:00
fn main() {
let red: Color = Color::Rgb(255, 0, 0);
2012-08-06 12:34:08 -07:00
match red {
2018-12-07 18:15:36 +00:00
Color::Rgb(r, g, b) => { println!("rgb"); }
Color::Hsl(h, s, l) => { println!("hsl"); }
//~^ ERROR no variant
}
2010-06-23 21:03:09 -07:00
}