]> git.proxmox.com Git - rustc.git/blame - tests/mir-opt/basic_assignment.main.ElaborateDrops.diff
New upstream version 1.74.1+dfsg1
[rustc.git] / tests / mir-opt / basic_assignment.main.ElaborateDrops.diff
CommitLineData
353b0b11
FG
1- // MIR for `main` before ElaborateDrops
2+ // MIR for `main` after ElaborateDrops
3
4 fn main() -> () {
fe692bf9
FG
5 let mut _0: ();
6 let _1: bool;
7 let mut _3: bool;
8 let mut _6: std::option::Option<std::boxed::Box<u32>>;
353b0b11 9 scope 1 {
fe692bf9
FG
10 debug nodrop_x => _1;
11 let _2: bool;
353b0b11 12 scope 2 {
fe692bf9
FG
13 debug nodrop_y => _2;
14 let _4: std::option::Option<std::boxed::Box<u32>>;
353b0b11 15 scope 3 {
fe692bf9
FG
16 debug drop_x => _4;
17 let _5: std::option::Option<std::boxed::Box<u32>>;
353b0b11 18 scope 4 {
fe692bf9 19 debug drop_y => _5;
353b0b11
FG
20 }
21 }
22 }
23 }
24
25 bb0: {
fe692bf9
FG
26 StorageLive(_1);
27 _1 = const false;
28 StorageLive(_2);
29 StorageLive(_3);
30 _3 = _1;
31 _2 = move _3;
32 StorageDead(_3);
33 StorageLive(_4);
34 _4 = Option::<Box<u32>>::None;
35 StorageLive(_5);
36 StorageLive(_6);
37 _6 = move _4;
38- drop(_5) -> [return: bb1, unwind: bb2];
39+ goto -> bb1;
353b0b11
FG
40 }
41
42 bb1: {
fe692bf9
FG
43 _5 = move _6;
44- drop(_6) -> [return: bb3, unwind: bb6];
45+ goto -> bb3;
353b0b11
FG
46 }
47
48 bb2 (cleanup): {
fe692bf9 49 _5 = move _6;
781aab86 50- drop(_6) -> [return: bb6, unwind terminate(cleanup)];
add651ee 51+ goto -> bb6;
353b0b11
FG
52 }
53
54 bb3: {
fe692bf9
FG
55 StorageDead(_6);
56 _0 = const ();
57 drop(_5) -> [return: bb4, unwind: bb7];
353b0b11
FG
58 }
59
60 bb4: {
fe692bf9
FG
61 StorageDead(_5);
62- drop(_4) -> [return: bb5, unwind continue];
63+ goto -> bb5;
353b0b11
FG
64 }
65
66 bb5: {
fe692bf9
FG
67 StorageDead(_4);
68 StorageDead(_2);
69 StorageDead(_1);
70 return;
353b0b11
FG
71 }
72
73 bb6 (cleanup): {
781aab86 74- drop(_5) -> [return: bb7, unwind terminate(cleanup)];
add651ee 75+ goto -> bb7;
353b0b11
FG
76 }
77
78 bb7 (cleanup): {
781aab86 79- drop(_4) -> [return: bb8, unwind terminate(cleanup)];
fe692bf9 80+ goto -> bb8;
353b0b11
FG
81 }
82
83 bb8 (cleanup): {
fe692bf9 84 resume;
353b0b11
FG
85 }
86 }
87