summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/dead-code/enum-variants.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/lint/dead-code/enum-variants.rs')
-rw-r--r--tests/ui/lint/dead-code/enum-variants.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/lint/dead-code/enum-variants.rs b/tests/ui/lint/dead-code/enum-variants.rs
new file mode 100644
index 000000000..91c97232e
--- /dev/null
+++ b/tests/ui/lint/dead-code/enum-variants.rs
@@ -0,0 +1,14 @@
+// run-pass
+
+#![deny(dead_code)]
+
+enum Foo {
+ A,
+ B,
+}
+
+pub fn main() {
+ match Foo::A {
+ Foo::A | Foo::B => Foo::B
+ };
+}