]> git.proxmox.com Git - rustc.git/blame - tests/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.panic-unwind.mir
New upstream version 1.74.1+dfsg1
[rustc.git] / tests / mir-opt / no_spurious_drop_after_call.main.ElaborateDrops.before.panic-unwind.mir
CommitLineData
fe692bf9
FG
1// MIR for `main` before ElaborateDrops
2
3fn main() -> () {
4 let mut _0: ();
5 let _1: ();
6 let mut _2: std::string::String;
7 let mut _3: &str;
8 let _4: &str;
9
10 bb0: {
11 StorageLive(_1);
12 StorageLive(_2);
13 StorageLive(_3);
14 StorageLive(_4);
15 _4 = const "";
16 _3 = &(*_4);
17 _2 = <str as ToString>::to_string(move _3) -> [return: bb1, unwind continue];
18 }
19
20 bb1: {
21 StorageDead(_3);
22 _1 = std::mem::drop::<String>(move _2) -> [return: bb2, unwind: bb3];
23 }
24
25 bb2: {
26 StorageDead(_2);
27 StorageDead(_4);
28 StorageDead(_1);
29 _0 = const ();
30 return;
31 }
32
33 bb3 (cleanup): {
781aab86 34 drop(_2) -> [return: bb4, unwind terminate(cleanup)];
fe692bf9
FG
35 }
36
37 bb4 (cleanup): {
38 resume;
39 }
40}