about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-03-08 21:26:51 +0100
committerGitHub <noreply@github.com>2023-03-08 21:26:51 +0100
commit4e84fbf8a0545fd750dfb9bfe262d782d1398a77 (patch)
tree20c3c538ac48c2022fe209ade2a18662e34cf0f9 /tests
parent2428083558a3c9ab1483c299080a4b784a187b6e (diff)
parent153bfa06e5b8ff57ac5d9274c174c8230a7399eb (diff)
downloadrust-4e84fbf8a0545fd750dfb9bfe262d782d1398a77.tar.gz
rust-4e84fbf8a0545fd750dfb9bfe262d782d1398a77.zip
Rollup merge of #108856 - Zeegomo:remove-drop-and-rep, r=tmiasko
Remove DropAndReplace terminator

#107844 made DropAndReplace unused, let's remove it completely from the codebase.
Diffstat (limited to 'tests')
-rw-r--r--tests/mir-opt/building/custom/terminators.drop_first.built.after.mir5
-rw-r--r--tests/mir-opt/building/custom/terminators.rs3
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/mir-opt/building/custom/terminators.drop_first.built.after.mir b/tests/mir-opt/building/custom/terminators.drop_first.built.after.mir
index c903e594696..ada78c0fc78 100644
--- a/tests/mir-opt/building/custom/terminators.drop_first.built.after.mir
+++ b/tests/mir-opt/building/custom/terminators.drop_first.built.after.mir
@@ -4,10 +4,11 @@ fn drop_first(_1: WriteOnDrop<'_>, _2: WriteOnDrop<'_>) -> () {
     let mut _0: ();                      // return place in scope 0 at $DIR/terminators.rs:+0:59: +0:59
 
     bb0: {
-        replace(_1 <- move _2) -> bb1;   // scope 0 at $DIR/terminators.rs:+3:13: +3:49
+        drop(_1) -> bb1;                 // scope 0 at $DIR/terminators.rs:+3:13: +3:30
     }
 
     bb1: {
-        return;                          // scope 0 at $DIR/terminators.rs:+7:13: +7:21
+        _1 = move _2;                    // scope 0 at $DIR/terminators.rs:+7:13: +7:24
+        return;                          // scope 0 at $DIR/terminators.rs:+8:13: +8:21
     }
 }
diff --git a/tests/mir-opt/building/custom/terminators.rs b/tests/mir-opt/building/custom/terminators.rs
index c23233fcf9a..f1240566168 100644
--- a/tests/mir-opt/building/custom/terminators.rs
+++ b/tests/mir-opt/building/custom/terminators.rs
@@ -48,10 +48,11 @@ impl<'a> Drop for WriteOnDrop<'a> {
 fn drop_first<'a>(a: WriteOnDrop<'a>, b: WriteOnDrop<'a>) {
     mir!(
         {
-            DropAndReplace(a, Move(b), retblock)
+            Drop(a, retblock)
         }
 
         retblock = {
+            a = Move(b);
             Return()
         }
     )