]>
Commit | Line | Data |
---|---|---|
29967ef6 XL |
1 | - // MIR for `drop` before Inline |
2 | + // MIR for `drop` after Inline | |
3 | ||
4 | fn drop(_1: *mut Vec<A>, _2: *mut Option<B>) -> () { | |
064997fb FG |
5 | debug a => _1; // in scope 0 at $DIR/inline-shims.rs:+0:19: +0:20 |
6 | debug b => _2; // in scope 0 at $DIR/inline-shims.rs:+0:35: +0:36 | |
7 | let mut _0: (); // return place in scope 0 at $DIR/inline-shims.rs:+0:54: +0:54 | |
8 | let _3: (); // in scope 0 at $DIR/inline-shims.rs:+1:14: +1:40 | |
9 | let mut _4: *mut std::vec::Vec<A>; // in scope 0 at $DIR/inline-shims.rs:+1:38: +1:39 | |
10 | let mut _5: *mut std::option::Option<B>; // in scope 0 at $DIR/inline-shims.rs:+2:38: +2:39 | |
29967ef6 XL |
11 | scope 1 { |
12 | } | |
13 | scope 2 { | |
6a06907d | 14 | + scope 3 (inlined std::ptr::drop_in_place::<Option<B>> - shim(Some(Option<B>))) { // at $DIR/inline-shims.rs:12:14: 12:40 |
5e7ed085 FG |
15 | + let mut _6: isize; // in scope 3 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL |
16 | + let mut _7: isize; // in scope 3 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL | |
29967ef6 XL |
17 | + } |
18 | } | |
19 | ||
20 | bb0: { | |
064997fb FG |
21 | StorageLive(_3); // scope 0 at $DIR/inline-shims.rs:+1:5: +1:42 |
22 | StorageLive(_4); // scope 1 at $DIR/inline-shims.rs:+1:38: +1:39 | |
23 | _4 = _1; // scope 1 at $DIR/inline-shims.rs:+1:38: +1:39 | |
24 | _3 = std::ptr::drop_in_place::<Vec<A>>(move _4) -> bb1; // scope 1 at $DIR/inline-shims.rs:+1:14: +1:40 | |
29967ef6 XL |
25 | // mir::Constant |
26 | // + span: $DIR/inline-shims.rs:11:14: 11:37 | |
064997fb | 27 | // + literal: Const { ty: unsafe fn(*mut Vec<A>) {std::ptr::drop_in_place::<Vec<A>>}, val: Value(<ZST>) } |
29967ef6 XL |
28 | } |
29 | ||
30 | bb1: { | |
064997fb FG |
31 | StorageDead(_4); // scope 1 at $DIR/inline-shims.rs:+1:39: +1:40 |
32 | StorageDead(_3); // scope 0 at $DIR/inline-shims.rs:+1:41: +1:42 | |
33 | StorageLive(_5); // scope 2 at $DIR/inline-shims.rs:+2:38: +2:39 | |
34 | _5 = _2; // scope 2 at $DIR/inline-shims.rs:+2:38: +2:39 | |
35 | - _0 = std::ptr::drop_in_place::<Option<B>>(move _5) -> bb2; // scope 2 at $DIR/inline-shims.rs:+2:14: +2:40 | |
29967ef6 XL |
36 | - // mir::Constant |
37 | - // + span: $DIR/inline-shims.rs:12:14: 12:37 | |
064997fb FG |
38 | - // + literal: Const { ty: unsafe fn(*mut Option<B>) {std::ptr::drop_in_place::<Option<B>>}, val: Value(<ZST>) } |
39 | + StorageLive(_6); // scope 2 at $DIR/inline-shims.rs:+2:14: +2:40 | |
40 | + StorageLive(_7); // scope 2 at $DIR/inline-shims.rs:+2:14: +2:40 | |
5e7ed085 FG |
41 | + _6 = discriminant((*_5)); // scope 3 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL |
42 | + switchInt(move _6) -> [0_isize: bb2, otherwise: bb3]; // scope 3 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL | |
29967ef6 XL |
43 | } |
44 | ||
45 | bb2: { | |
064997fb FG |
46 | + StorageDead(_7); // scope 2 at $DIR/inline-shims.rs:+2:14: +2:40 |
47 | + StorageDead(_6); // scope 2 at $DIR/inline-shims.rs:+2:14: +2:40 | |
48 | StorageDead(_5); // scope 2 at $DIR/inline-shims.rs:+2:39: +2:40 | |
49 | return; // scope 0 at $DIR/inline-shims.rs:+3:2: +3:2 | |
29967ef6 XL |
50 | + } |
51 | + | |
52 | + bb3: { | |
5e7ed085 | 53 | + drop((((*_5) as Some).0: B)) -> bb2; // scope 3 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL |
29967ef6 XL |
54 | } |
55 | } | |
56 |