about summary refs log tree commit diff
path: root/tests/mir-opt/building/custom
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-12-26 19:31:52 +0100
committerRalf Jung <post@ralfj.de>2023-12-26 20:15:26 +0100
commit0f9baa8a31a4bf4d38ff90e402d43f0cd19662a8 (patch)
treea3a3ffb54aad685b1a058d7dbca66b8a47400c0f /tests/mir-opt/building/custom
parente1fadb2c35a6082867a037f012bfdfc5eb686211 (diff)
downloadrust-0f9baa8a31a4bf4d38ff90e402d43f0cd19662a8.tar.gz
rust-0f9baa8a31a4bf4d38ff90e402d43f0cd19662a8.zip
custom mir: make it clear what the return block is
Diffstat (limited to 'tests/mir-opt/building/custom')
-rw-r--r--tests/mir-opt/building/custom/terminators.rs8
-rw-r--r--tests/mir-opt/building/custom/unwind_action.rs8
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/mir-opt/building/custom/terminators.rs b/tests/mir-opt/building/custom/terminators.rs
index a83a6c07461..01c132cf3e7 100644
--- a/tests/mir-opt/building/custom/terminators.rs
+++ b/tests/mir-opt/building/custom/terminators.rs
@@ -13,7 +13,7 @@ fn ident<T>(t: T) -> T {
 fn direct_call(x: i32) -> i32 {
     mir!(
         {
-            Call(RET = ident(x), retblock, UnwindContinue())
+            Call(RET = ident(x), ReturnTo(retblock), UnwindContinue())
         }
 
         retblock = {
@@ -27,7 +27,7 @@ fn direct_call(x: i32) -> i32 {
 fn indirect_call(x: i32, f: fn(i32) -> i32) -> i32 {
     mir!(
         {
-            Call(RET = f(x), retblock, UnwindContinue())
+            Call(RET = f(x), ReturnTo(retblock), UnwindContinue())
         }
 
         retblock = {
@@ -49,7 +49,7 @@ impl<'a> Drop for WriteOnDrop<'a> {
 fn drop_first<'a>(a: WriteOnDrop<'a>, b: WriteOnDrop<'a>) {
     mir!(
         {
-            Drop(a, retblock, UnwindContinue())
+            Drop(a, ReturnTo(retblock), UnwindContinue())
         }
 
         retblock = {
@@ -64,7 +64,7 @@ fn drop_first<'a>(a: WriteOnDrop<'a>, b: WriteOnDrop<'a>) {
 fn drop_second<'a>(a: WriteOnDrop<'a>, b: WriteOnDrop<'a>) {
     mir!(
         {
-            Drop(b, retblock, UnwindContinue())
+            Drop(b, ReturnTo(retblock), UnwindContinue())
         }
 
         retblock = {
diff --git a/tests/mir-opt/building/custom/unwind_action.rs b/tests/mir-opt/building/custom/unwind_action.rs
index e3c4ffac358..0dfbf780f67 100644
--- a/tests/mir-opt/building/custom/unwind_action.rs
+++ b/tests/mir-opt/building/custom/unwind_action.rs
@@ -11,7 +11,7 @@ use core::intrinsics::mir::*;
 pub fn a() {
     mir!(
         {
-            Call(RET = a(), bb1, UnwindUnreachable())
+            Call(RET = a(), ReturnTo(bb1), UnwindUnreachable())
         }
         bb1 = {
             Return()
@@ -26,7 +26,7 @@ pub fn a() {
 pub fn b() {
     mir!(
         {
-            Call(RET = b(), bb1, UnwindContinue())
+            Call(RET = b(), ReturnTo(bb1), UnwindContinue())
         }
         bb1 = {
             Return()
@@ -41,7 +41,7 @@ pub fn b() {
 pub fn c() {
     mir!(
         {
-            Call(RET = c(), bb1, UnwindTerminate(ReasonAbi))
+            Call(RET = c(), ReturnTo(bb1), UnwindTerminate(ReasonAbi))
         }
         bb1 = {
             Return()
@@ -56,7 +56,7 @@ pub fn c() {
 pub fn d() {
     mir!(
         {
-            Call(RET = d(), bb1, UnwindCleanup(bb2))
+            Call(RET = d(), ReturnTo(bb1), UnwindCleanup(bb2))
         }
         bb1 = {
             Return()