summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-41213.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-41213.rs')
-rw-r--r--tests/ui/issues/issue-41213.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-41213.rs b/tests/ui/issues/issue-41213.rs
new file mode 100644
index 000000000..5c91bf711
--- /dev/null
+++ b/tests/ui/issues/issue-41213.rs
@@ -0,0 +1,24 @@
+// run-pass
+#![allow(dead_code)]
+enum A {
+ A1,
+ A2,
+ A3,
+}
+
+enum B {
+ B1(String, String),
+ B2(String, String),
+}
+
+fn main() {
+ let a = A::A1;
+ loop {
+ let _ctor = match a {
+ A::A3 => break,
+ A::A1 => B::B1,
+ A::A2 => B::B2,
+ };
+ break;
+ }
+}