about summary refs log tree commit diff
path: root/tests/mir-opt/derefer_inline_test.main.Derefer.panic-unwind.diff
diff options
context:
space:
mode:
authorPietro Albini <pietro.albini@ferrous-systems.com>2023-06-08 09:34:53 +0200
committerPietro Albini <pietro.albini@ferrous-systems.com>2023-06-12 09:34:17 +0200
commit466812394508495935ff3eb57152ce231a3635eb (patch)
tree244824425c21eccf1fab9ee02be3ad111a77adf9 /tests/mir-opt/derefer_inline_test.main.Derefer.panic-unwind.diff
parent070cc836e95517fff04699ceb9f85ec017befc58 (diff)
downloadrust-466812394508495935ff3eb57152ce231a3635eb.tar.gz
rust-466812394508495935ff3eb57152ce231a3635eb.zip
bless mir-opt
To reproduce the changes in this commit locally:

- Run `./x test tidy` and remove all the output files not associated
  with a test file anymore, as reported by tidy.
- Run `./x test tests/mir-opt --bless` to generate the new outputs.
Diffstat (limited to 'tests/mir-opt/derefer_inline_test.main.Derefer.panic-unwind.diff')
-rw-r--r--tests/mir-opt/derefer_inline_test.main.Derefer.panic-unwind.diff45
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/mir-opt/derefer_inline_test.main.Derefer.panic-unwind.diff b/tests/mir-opt/derefer_inline_test.main.Derefer.panic-unwind.diff
new file mode 100644
index 00000000000..426d4fb213c
--- /dev/null
+++ b/tests/mir-opt/derefer_inline_test.main.Derefer.panic-unwind.diff
@@ -0,0 +1,45 @@
+- // MIR for `main` before Derefer
++ // MIR for `main` after Derefer
+  
+  fn main() -> () {
+      let mut _0: ();                      // return place in scope 0 at $DIR/derefer_inline_test.rs:+0:11: +0:11
+      let _1: std::boxed::Box<std::boxed::Box<u32>>; // in scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:18
+      let mut _2: std::boxed::Box<u32>;    // in scope 0 at $DIR/derefer_inline_test.rs:+1:14: +1:17
+  
+      bb0: {
+          StorageLive(_1);                 // scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:18
+          StorageLive(_2);                 // scope 0 at $DIR/derefer_inline_test.rs:+1:14: +1:17
+          _2 = f() -> bb1;                 // scope 0 at $DIR/derefer_inline_test.rs:+1:14: +1:17
+                                           // mir::Constant
+                                           // + span: $DIR/derefer_inline_test.rs:10:14: 10:15
+                                           // + literal: Const { ty: fn() -> Box<u32> {f}, val: Value(<ZST>) }
+      }
+  
+      bb1: {
+          _1 = Box::<Box<u32>>::new(move _2) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:18
+                                           // mir::Constant
+                                           // + span: $DIR/derefer_inline_test.rs:10:5: 10:13
+                                           // + user_ty: UserType(0)
+                                           // + literal: Const { ty: fn(Box<u32>) -> Box<Box<u32>> {Box::<Box<u32>>::new}, val: Value(<ZST>) }
+      }
+  
+      bb2: {
+          StorageDead(_2);                 // scope 0 at $DIR/derefer_inline_test.rs:+1:17: +1:18
+          drop(_1) -> bb3;                 // scope 0 at $DIR/derefer_inline_test.rs:+1:18: +1:19
+      }
+  
+      bb3: {
+          StorageDead(_1);                 // scope 0 at $DIR/derefer_inline_test.rs:+1:18: +1:19
+          _0 = const ();                   // scope 0 at $DIR/derefer_inline_test.rs:+0:11: +2:2
+          return;                          // scope 0 at $DIR/derefer_inline_test.rs:+2:2: +2:2
+      }
+  
+      bb4 (cleanup): {
+          drop(_2) -> [return: bb5, unwind terminate]; // scope 0 at $DIR/derefer_inline_test.rs:+1:17: +1:18
+      }
+  
+      bb5 (cleanup): {
+          resume;                          // scope 0 at $DIR/derefer_inline_test.rs:+0:1: +2:2
+      }
+  }
+