summaryrefslogtreecommitdiffstats
path: root/src/test/ui/bogus-tag.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/bogus-tag.rs')
-rw-r--r--src/test/ui/bogus-tag.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/bogus-tag.rs b/src/test/ui/bogus-tag.rs
new file mode 100644
index 000000000..c594385ee
--- /dev/null
+++ b/src/test/ui/bogus-tag.rs
@@ -0,0 +1,10 @@
+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
+ }
+}