summaryrefslogtreecommitdiffstats
path: root/src/test/mir-opt/issue-49232.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/mir-opt/issue-49232.rs')
-rw-r--r--src/test/mir-opt/issue-49232.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/mir-opt/issue-49232.rs b/src/test/mir-opt/issue-49232.rs
new file mode 100644
index 000000000..86494c76a
--- /dev/null
+++ b/src/test/mir-opt/issue-49232.rs
@@ -0,0 +1,15 @@
+// We must mark a variable whose initialization fails due to an
+// abort statement as StorageDead.
+
+// EMIT_MIR issue_49232.main.mir_map.0.mir
+fn main() {
+ loop {
+ let beacon = {
+ match true {
+ false => 4,
+ true => break,
+ }
+ };
+ drop(&beacon);
+ }
+}