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