]>
Commit | Line | Data |
---|---|---|
ba9703b0 XL |
1 | // MIR for `test` after ElaborateDrops |
2 | ||
3 | fn test() -> () { | |
487cf647 FG |
4 | let mut _0: (); // return place in scope 0 at $DIR/issue_41110.rs:+0:15: +0:15 |
5 | let _1: S; // in scope 0 at $DIR/issue_41110.rs:+1:9: +1:10 | |
6 | let _3: (); // in scope 0 at $DIR/issue_41110.rs:+3:5: +3:12 | |
7 | let mut _4: S; // in scope 0 at $DIR/issue_41110.rs:+3:10: +3:11 | |
8 | let mut _5: S; // in scope 0 at $DIR/issue_41110.rs:+4:9: +4:10 | |
9 | let mut _6: bool; // in scope 0 at $DIR/issue_41110.rs:+5:1: +5:2 | |
ba9703b0 | 10 | scope 1 { |
487cf647 FG |
11 | debug u => _1; // in scope 1 at $DIR/issue_41110.rs:+1:9: +1:10 |
12 | let mut _2: S; // in scope 1 at $DIR/issue_41110.rs:+2:9: +2:14 | |
ba9703b0 | 13 | scope 2 { |
487cf647 | 14 | debug v => _2; // in scope 2 at $DIR/issue_41110.rs:+2:9: +2:14 |
ba9703b0 XL |
15 | } |
16 | } | |
17 | ||
18 | bb0: { | |
487cf647 FG |
19 | _6 = const false; // scope 0 at $DIR/issue_41110.rs:+1:9: +1:10 |
20 | StorageLive(_1); // scope 0 at $DIR/issue_41110.rs:+1:9: +1:10 | |
21 | _6 = const true; // scope 0 at $DIR/issue_41110.rs:+1:13: +1:14 | |
22 | _1 = S; // scope 0 at $DIR/issue_41110.rs:+1:13: +1:14 | |
23 | StorageLive(_2); // scope 1 at $DIR/issue_41110.rs:+2:9: +2:14 | |
24 | _2 = S; // scope 1 at $DIR/issue_41110.rs:+2:17: +2:18 | |
25 | StorageLive(_3); // scope 2 at $DIR/issue_41110.rs:+3:5: +3:12 | |
26 | StorageLive(_4); // scope 2 at $DIR/issue_41110.rs:+3:10: +3:11 | |
27 | _4 = move _2; // scope 2 at $DIR/issue_41110.rs:+3:10: +3:11 | |
28 | _3 = std::mem::drop::<S>(move _4) -> [return: bb1, unwind: bb7]; // scope 2 at $DIR/issue_41110.rs:+3:5: +3:12 | |
ba9703b0 | 29 | // mir::Constant |
487cf647 | 30 | // + span: $DIR/issue_41110.rs:17:5: 17:9 |
064997fb | 31 | // + literal: Const { ty: fn(S) {std::mem::drop::<S>}, val: Value(<ZST>) } |
ba9703b0 XL |
32 | } |
33 | ||
29967ef6 | 34 | bb1: { |
487cf647 FG |
35 | StorageDead(_4); // scope 2 at $DIR/issue_41110.rs:+3:11: +3:12 |
36 | StorageDead(_3); // scope 2 at $DIR/issue_41110.rs:+3:12: +3:13 | |
37 | StorageLive(_5); // scope 2 at $DIR/issue_41110.rs:+4:9: +4:10 | |
38 | _6 = const false; // scope 2 at $DIR/issue_41110.rs:+4:9: +4:10 | |
39 | _5 = move _1; // scope 2 at $DIR/issue_41110.rs:+4:9: +4:10 | |
40 | goto -> bb12; // scope 2 at $DIR/issue_41110.rs:+4:5: +4:6 | |
ba9703b0 XL |
41 | } |
42 | ||
29967ef6 | 43 | bb2: { |
487cf647 | 44 | goto -> bb3; // scope 2 at $DIR/issue_41110.rs:+4:9: +4:10 |
ba9703b0 XL |
45 | } |
46 | ||
29967ef6 | 47 | bb3: { |
487cf647 FG |
48 | StorageDead(_5); // scope 2 at $DIR/issue_41110.rs:+4:9: +4:10 |
49 | _0 = const (); // scope 0 at $DIR/issue_41110.rs:+0:15: +5:2 | |
50 | drop(_2) -> [return: bb4, unwind: bb9]; // scope 1 at $DIR/issue_41110.rs:+5:1: +5:2 | |
ba9703b0 XL |
51 | } |
52 | ||
29967ef6 | 53 | bb4: { |
487cf647 FG |
54 | StorageDead(_2); // scope 1 at $DIR/issue_41110.rs:+5:1: +5:2 |
55 | goto -> bb5; // scope 0 at $DIR/issue_41110.rs:+5:1: +5:2 | |
29967ef6 XL |
56 | } |
57 | ||
58 | bb5: { | |
487cf647 FG |
59 | _6 = const false; // scope 0 at $DIR/issue_41110.rs:+5:1: +5:2 |
60 | StorageDead(_1); // scope 0 at $DIR/issue_41110.rs:+5:1: +5:2 | |
61 | return; // scope 0 at $DIR/issue_41110.rs:+5:2: +5:2 | |
ba9703b0 XL |
62 | } |
63 | ||
29967ef6 | 64 | bb6 (cleanup): { |
487cf647 | 65 | goto -> bb8; // scope 2 at $DIR/issue_41110.rs:+4:9: +4:10 |
ba9703b0 XL |
66 | } |
67 | ||
68 | bb7 (cleanup): { | |
487cf647 | 69 | goto -> bb8; // scope 2 at $DIR/issue_41110.rs:+3:11: +3:12 |
ba9703b0 XL |
70 | } |
71 | ||
29967ef6 | 72 | bb8 (cleanup): { |
487cf647 | 73 | goto -> bb9; // scope 1 at $DIR/issue_41110.rs:+5:1: +5:2 |
ba9703b0 XL |
74 | } |
75 | ||
29967ef6 | 76 | bb9 (cleanup): { |
487cf647 | 77 | goto -> bb14; // scope 0 at $DIR/issue_41110.rs:+5:1: +5:2 |
ba9703b0 XL |
78 | } |
79 | ||
29967ef6 | 80 | bb10 (cleanup): { |
487cf647 | 81 | resume; // scope 0 at $DIR/issue_41110.rs:+0:1: +5:2 |
ba9703b0 XL |
82 | } |
83 | ||
84 | bb11 (cleanup): { | |
487cf647 FG |
85 | _2 = move _5; // scope 2 at $DIR/issue_41110.rs:+4:5: +4:6 |
86 | goto -> bb6; // scope 2 at $DIR/issue_41110.rs:+4:5: +4:6 | |
ba9703b0 XL |
87 | } |
88 | ||
89 | bb12: { | |
487cf647 FG |
90 | _2 = move _5; // scope 2 at $DIR/issue_41110.rs:+4:5: +4:6 |
91 | goto -> bb2; // scope 2 at $DIR/issue_41110.rs:+4:5: +4:6 | |
ba9703b0 XL |
92 | } |
93 | ||
94 | bb13 (cleanup): { | |
487cf647 | 95 | drop(_1) -> bb10; // scope 0 at $DIR/issue_41110.rs:+5:1: +5:2 |
ba9703b0 XL |
96 | } |
97 | ||
98 | bb14 (cleanup): { | |
487cf647 | 99 | switchInt(_6) -> [false: bb10, otherwise: bb13]; // scope 0 at $DIR/issue_41110.rs:+5:1: +5:2 |
ba9703b0 XL |
100 | } |
101 | } |