summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/lower_intrinsics.forget.LowerIntrinsics.panic-unwind.diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/mir-opt/lower_intrinsics.forget.LowerIntrinsics.panic-unwind.diff26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/mir-opt/lower_intrinsics.forget.LowerIntrinsics.panic-unwind.diff b/tests/mir-opt/lower_intrinsics.forget.LowerIntrinsics.panic-unwind.diff
new file mode 100644
index 000000000..7d300e6c6
--- /dev/null
+++ b/tests/mir-opt/lower_intrinsics.forget.LowerIntrinsics.panic-unwind.diff
@@ -0,0 +1,26 @@
+- // MIR for `forget` before LowerIntrinsics
++ // MIR for `forget` after LowerIntrinsics
+
+ fn forget(_1: T) -> () {
+ debug t => _1;
+ let mut _0: ();
+ let mut _2: T;
+
+ bb0: {
+ StorageLive(_2);
+ _2 = move _1;
+- _0 = std::intrinsics::forget::<T>(move _2) -> [return: bb1, unwind unreachable];
++ _0 = const ();
++ goto -> bb1;
+ }
+
+ bb1: {
+ StorageDead(_2);
+ goto -> bb2;
+ }
+
+ bb2: {
+ return;
+ }
+ }
+