about summary refs log tree commit diff
path: root/tests/ui/match
diff options
context:
space:
mode:
authorDuskyElf <91879372+DuskyElf@users.noreply.github.com>2025-02-04 17:02:37 +0530
committerDuskyElf <91879372+DuskyElf@users.noreply.github.com>2025-02-04 17:02:37 +0530
commit2431977ecfe6e88e71ddad8bf0bb9a10f9a6256c (patch)
treef94ac85313d1ac9f909dff1e142e7c54ccc59750 /tests/ui/match
parent8a8b4641754e9ce8a31b272dda6567727452df9e (diff)
downloadrust-2431977ecfe6e88e71ddad8bf0bb9a10f9a6256c.tar.gz
rust-2431977ecfe6e88e71ddad8bf0bb9a10f9a6256c.zip
Rename and Move some UI tests to more suitable subdirs
Diffstat (limited to 'tests/ui/match')
-rw-r--r--tests/ui/match/enum-and-break-in-match-issue-41213.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/ui/match/enum-and-break-in-match-issue-41213.rs b/tests/ui/match/enum-and-break-in-match-issue-41213.rs
new file mode 100644
index 00000000000..97f80a99a83
--- /dev/null
+++ b/tests/ui/match/enum-and-break-in-match-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;
+    }
+}