]> git.proxmox.com Git - rustc.git/blob - tests/mir-opt/issue_41110.test.ElaborateDrops.panic-abort.diff
New upstream version 1.72.1+dfsg1
[rustc.git] / tests / mir-opt / issue_41110.test.ElaborateDrops.panic-abort.diff
1 - // MIR for `test` before ElaborateDrops
2 + // MIR for `test` after ElaborateDrops
3
4 fn test() -> () {
5 let mut _0: ();
6 let _1: S;
7 let _3: ();
8 let mut _4: S;
9 let mut _5: S;
10 + let mut _6: bool;
11 scope 1 {
12 debug u => _1;
13 let mut _2: S;
14 scope 2 {
15 debug v => _2;
16 }
17 }
18
19 bb0: {
20 + _6 = const false;
21 StorageLive(_1);
22 + _6 = const true;
23 _1 = S;
24 StorageLive(_2);
25 _2 = S;
26 StorageLive(_3);
27 StorageLive(_4);
28 _4 = move _2;
29 _3 = std::mem::drop::<S>(move _4) -> [return: bb1, unwind: bb7];
30 }
31
32 bb1: {
33 StorageDead(_4);
34 StorageDead(_3);
35 StorageLive(_5);
36 + _6 = const false;
37 _5 = move _1;
38 - drop(_2) -> [return: bb2, unwind: bb3];
39 + goto -> bb2;
40 }
41
42 bb2: {
43 _2 = move _5;
44 - drop(_5) -> [return: bb4, unwind: bb8];
45 + goto -> bb4;
46 }
47
48 bb3 (cleanup): {
49 _2 = move _5;
50 drop(_5) -> [return: bb8, unwind terminate];
51 }
52
53 bb4: {
54 StorageDead(_5);
55 _0 = const ();
56 drop(_2) -> [return: bb5, unwind: bb9];
57 }
58
59 bb5: {
60 StorageDead(_2);
61 - drop(_1) -> [return: bb6, unwind: bb10];
62 + goto -> bb6;
63 }
64
65 bb6: {
66 + _6 = const false;
67 StorageDead(_1);
68 return;
69 }
70
71 bb7 (cleanup): {
72 - drop(_4) -> [return: bb8, unwind terminate];
73 + goto -> bb8;
74 }
75
76 bb8 (cleanup): {
77 - drop(_2) -> [return: bb9, unwind terminate];
78 + goto -> bb9;
79 }
80
81 bb9 (cleanup): {
82 - drop(_1) -> [return: bb10, unwind terminate];
83 + goto -> bb13;
84 }
85
86 bb10 (cleanup): {
87 resume;
88 + }
89 +
90 + bb11 (cleanup): {
91 + unreachable;
92 + }
93 +
94 + bb12 (cleanup): {
95 + drop(_1) -> [return: bb10, unwind terminate];
96 + }
97 +
98 + bb13 (cleanup): {
99 + switchInt(_6) -> [0: bb10, otherwise: bb12];
100 }
101 }
102