about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.panic-abort.diff48
-rw-r--r--tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.panic-unwind.diff48
-rw-r--r--tests/mir-opt/lower_intrinsics.rs12
3 files changed, 0 insertions, 108 deletions
diff --git a/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.panic-abort.diff b/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.panic-abort.diff
deleted file mode 100644
index 194478560e9..00000000000
--- a/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.panic-abort.diff
+++ /dev/null
@@ -1,48 +0,0 @@
-- // MIR for `option_payload` before LowerIntrinsics
-+ // MIR for `option_payload` after LowerIntrinsics
-  
-  fn option_payload(_1: &Option<usize>, _2: &Option<String>) -> () {
-      debug o => _1;
-      debug p => _2;
-      let mut _0: ();
-      let mut _4: *const std::option::Option<usize>;
-      let mut _6: *const std::option::Option<std::string::String>;
-      scope 1 {
-          let _3: *const usize;
-          scope 2 {
-              debug _x => _3;
-              let _5: *const std::string::String;
-              scope 3 {
-                  debug _y => _5;
-              }
-          }
-      }
-  
-      bb0: {
-          StorageLive(_3);
-          StorageLive(_4);
-          _4 = &raw const (*_1);
--         _3 = option_payload_ptr::<usize>(move _4) -> [return: bb1, unwind unreachable];
-+         _3 = &raw const (((*_4) as Some).0: usize);
-+         goto -> bb1;
-      }
-  
-      bb1: {
-          StorageDead(_4);
-          StorageLive(_5);
-          StorageLive(_6);
-          _6 = &raw const (*_2);
--         _5 = option_payload_ptr::<String>(move _6) -> [return: bb2, unwind unreachable];
-+         _5 = &raw const (((*_6) as Some).0: std::string::String);
-+         goto -> bb2;
-      }
-  
-      bb2: {
-          StorageDead(_6);
-          _0 = const ();
-          StorageDead(_5);
-          StorageDead(_3);
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.panic-unwind.diff b/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.panic-unwind.diff
deleted file mode 100644
index 194478560e9..00000000000
--- a/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.panic-unwind.diff
+++ /dev/null
@@ -1,48 +0,0 @@
-- // MIR for `option_payload` before LowerIntrinsics
-+ // MIR for `option_payload` after LowerIntrinsics
-  
-  fn option_payload(_1: &Option<usize>, _2: &Option<String>) -> () {
-      debug o => _1;
-      debug p => _2;
-      let mut _0: ();
-      let mut _4: *const std::option::Option<usize>;
-      let mut _6: *const std::option::Option<std::string::String>;
-      scope 1 {
-          let _3: *const usize;
-          scope 2 {
-              debug _x => _3;
-              let _5: *const std::string::String;
-              scope 3 {
-                  debug _y => _5;
-              }
-          }
-      }
-  
-      bb0: {
-          StorageLive(_3);
-          StorageLive(_4);
-          _4 = &raw const (*_1);
--         _3 = option_payload_ptr::<usize>(move _4) -> [return: bb1, unwind unreachable];
-+         _3 = &raw const (((*_4) as Some).0: usize);
-+         goto -> bb1;
-      }
-  
-      bb1: {
-          StorageDead(_4);
-          StorageLive(_5);
-          StorageLive(_6);
-          _6 = &raw const (*_2);
--         _5 = option_payload_ptr::<String>(move _6) -> [return: bb2, unwind unreachable];
-+         _5 = &raw const (((*_6) as Some).0: std::string::String);
-+         goto -> bb2;
-      }
-  
-      bb2: {
-          StorageDead(_6);
-          _0 = const ();
-          StorageDead(_5);
-          StorageDead(_3);
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/lower_intrinsics.rs b/tests/mir-opt/lower_intrinsics.rs
index 913605cc2b2..cba2bc18d86 100644
--- a/tests/mir-opt/lower_intrinsics.rs
+++ b/tests/mir-opt/lower_intrinsics.rs
@@ -222,18 +222,6 @@ pub fn write_via_move_string(r: &mut String, v: String) {
 
 pub enum Never {}
 
-// EMIT_MIR lower_intrinsics.option_payload.LowerIntrinsics.diff
-pub fn option_payload(o: &Option<usize>, p: &Option<String>) {
-    // CHECK-LABEL: fn option_payload(
-    // CHECK: {{_.*}} = &raw const (((*{{_.*}}) as Some).0: usize);
-    // CHECK: {{_.*}} = &raw const (((*{{_.*}}) as Some).0: std::string::String);
-
-    unsafe {
-        let _x = core::intrinsics::option_payload_ptr(o);
-        let _y = core::intrinsics::option_payload_ptr(p);
-    }
-}
-
 // EMIT_MIR lower_intrinsics.ptr_offset.LowerIntrinsics.diff
 pub unsafe fn ptr_offset(p: *const i32, d: isize) -> *const i32 {
     // CHECK-LABEL: fn ptr_offset(