about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-04-14 02:02:13 +0000
committerbors <bors@rust-lang.org>2017-04-14 02:02:13 +0000
commit4f32e0dfb287c2b3d0c48cb3b8090b3902960084 (patch)
treeed7f957c40617780eb7606fc90319da67485918d /src/test
parent28a74299778cdad4ea999e4ee8f8c1ef793338bd (diff)
parentc04ae0f0cfcdc01180afa447585016d52e2667a9 (diff)
downloadrust-4f32e0dfb287c2b3d0c48cb3b8090b3902960084.tar.gz
rust-4f32e0dfb287c2b3d0c48cb3b8090b3902960084.zip
Auto merge of #41294 - frewsxcv:rollup, r=frewsxcv
Rollup of 4 pull requests

- Successful merges: #41279, #41281, #41287, #41292
- Failed merges:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/issue-41213.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/test/run-pass/issue-41213.rs b/src/test/run-pass/issue-41213.rs
new file mode 100644
index 00000000000..d4755020fef
--- /dev/null
+++ b/src/test/run-pass/issue-41213.rs
@@ -0,0 +1,32 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+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;
+    }
+}