Skip to content

Commit 5cf3c9a

Browse files
committed
moved renamed docs formatted | bogus-tag.rs
1 parent 7873de8 commit 5cf3c9a

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

tests/ui/bogus-tag.rs

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//! Tests invalid enum variant in a match expression.
2+
3+
enum Color {
4+
Rgb(isize, isize, isize),
5+
Rgba(isize, isize, isize, isize),
6+
}
7+
8+
fn main() {
9+
let red: Color = Color::Rgb(255, 0, 0);
10+
match red {
11+
Color::Rgb(r, g, b) => {
12+
println!("rgb");
13+
}
14+
Color::Hsl(h, s, l) => {
15+
//~^ ERROR no variant
16+
println!("hsl");
17+
}
18+
}
19+
}

0 commit comments

Comments
 (0)