From dc0db358abe19481e475e10c32149b53370f1a1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:57:31 +0200 Subject: Merging upstream version 1.72.1+dfsg1. Signed-off-by: Daniel Baumann --- ...efer_inline_test.main.Derefer.panic-unwind.diff | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tests/mir-opt/derefer_inline_test.main.Derefer.panic-unwind.diff (limited to 'tests/mir-opt/derefer_inline_test.main.Derefer.panic-unwind.diff') 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 000000000..2ada087b4 --- /dev/null +++ b/tests/mir-opt/derefer_inline_test.main.Derefer.panic-unwind.diff @@ -0,0 +1,38 @@ +- // MIR for `main` before Derefer ++ // MIR for `main` after Derefer + + fn main() -> () { + let mut _0: (); + let _1: std::boxed::Box>; + let mut _2: std::boxed::Box; + + bb0: { + StorageLive(_1); + StorageLive(_2); + _2 = f() -> [return: bb1, unwind continue]; + } + + bb1: { + _1 = Box::>::new(move _2) -> [return: bb2, unwind: bb4]; + } + + bb2: { + StorageDead(_2); + drop(_1) -> [return: bb3, unwind continue]; + } + + bb3: { + StorageDead(_1); + _0 = const (); + return; + } + + bb4 (cleanup): { + drop(_2) -> [return: bb5, unwind terminate]; + } + + bb5 (cleanup): { + resume; + } + } + -- cgit v1.2.3