2020-04-02 16:09:01 -05:00
|
|
|
// MIR for `main` before ElaborateDrops
|
|
|
|
|
|
|
|
fn main() -> () {
|
|
|
|
let mut _0: (); // return place in scope 0 at $DIR/box_expr.rs:6:11: 6:11
|
|
|
|
let _1: std::boxed::Box<S>; // in scope 0 at $DIR/box_expr.rs:7:9: 7:10
|
|
|
|
let mut _2: std::boxed::Box<S>; // in scope 0 at $DIR/box_expr.rs:7:13: 7:25
|
|
|
|
let _3: (); // in scope 0 at $DIR/box_expr.rs:8:5: 8:12
|
|
|
|
let mut _4: std::boxed::Box<S>; // in scope 0 at $DIR/box_expr.rs:8:10: 8:11
|
|
|
|
scope 1 {
|
|
|
|
debug x => _1; // in scope 1 at $DIR/box_expr.rs:7:9: 7:10
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2020-04-25 04:01:43 -05:00
|
|
|
StorageLive(_1); // scope 0 at $DIR/box_expr.rs:7:9: 7:10
|
|
|
|
StorageLive(_2); // scope 0 at $DIR/box_expr.rs:7:13: 7:25
|
|
|
|
_2 = Box(S); // scope 0 at $DIR/box_expr.rs:7:13: 7:25
|
2020-10-24 05:18:32 -05:00
|
|
|
(*_2) = S::new() -> [return: bb1, unwind: bb5]; // scope 0 at $DIR/box_expr.rs:7:17: 7:25
|
2020-04-02 16:09:01 -05:00
|
|
|
// mir::Constant
|
|
|
|
// + span: $DIR/box_expr.rs:7:17: 7:23
|
|
|
|
// + literal: Const { ty: fn() -> S {S::new}, val: Value(Scalar(<ZST>)) }
|
|
|
|
}
|
|
|
|
|
2020-10-02 15:11:24 -05:00
|
|
|
bb1: {
|
2020-06-04 10:29:10 -05:00
|
|
|
_1 = move _2; // scope 0 at $DIR/box_expr.rs:7:13: 7:25
|
2020-04-25 04:01:43 -05:00
|
|
|
StorageDead(_2); // scope 0 at $DIR/box_expr.rs:7:24: 7:25
|
|
|
|
StorageLive(_3); // scope 1 at $DIR/box_expr.rs:8:5: 8:12
|
|
|
|
StorageLive(_4); // scope 1 at $DIR/box_expr.rs:8:10: 8:11
|
|
|
|
_4 = move _1; // scope 1 at $DIR/box_expr.rs:8:10: 8:11
|
2020-10-24 05:18:32 -05:00
|
|
|
_3 = std::mem::drop::<Box<S>>(move _4) -> [return: bb2, unwind: bb4]; // scope 1 at $DIR/box_expr.rs:8:5: 8:12
|
2020-04-02 16:09:01 -05:00
|
|
|
// mir::Constant
|
|
|
|
// + span: $DIR/box_expr.rs:8:5: 8:9
|
|
|
|
// + literal: Const { ty: fn(std::boxed::Box<S>) {std::mem::drop::<std::boxed::Box<S>>}, val: Value(Scalar(<ZST>)) }
|
|
|
|
}
|
|
|
|
|
2020-10-24 05:18:32 -05:00
|
|
|
bb2: {
|
2020-04-25 04:01:43 -05:00
|
|
|
StorageDead(_4); // scope 1 at $DIR/box_expr.rs:8:11: 8:12
|
|
|
|
StorageDead(_3); // scope 1 at $DIR/box_expr.rs:8:12: 8:13
|
|
|
|
_0 = const (); // scope 0 at $DIR/box_expr.rs:6:11: 9:2
|
2020-10-24 05:18:32 -05:00
|
|
|
drop(_1) -> bb3; // scope 0 at $DIR/box_expr.rs:9:1: 9:2
|
2020-10-02 15:11:24 -05:00
|
|
|
}
|
|
|
|
|
2020-10-24 05:18:32 -05:00
|
|
|
bb3: {
|
2020-10-02 15:11:24 -05:00
|
|
|
StorageDead(_1); // scope 0 at $DIR/box_expr.rs:9:1: 9:2
|
|
|
|
return; // scope 0 at $DIR/box_expr.rs:9:2: 9:2
|
|
|
|
}
|
|
|
|
|
2020-10-24 05:18:32 -05:00
|
|
|
bb4 (cleanup): {
|
|
|
|
drop(_1) -> bb6; // scope 0 at $DIR/box_expr.rs:9:1: 9:2
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2020-10-24 05:18:32 -05:00
|
|
|
bb5 (cleanup): {
|
|
|
|
drop(_2) -> bb6; // scope 0 at $DIR/box_expr.rs:7:24: 7:25
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2020-10-24 05:18:32 -05:00
|
|
|
bb6 (cleanup): {
|
2020-10-02 15:11:24 -05:00
|
|
|
resume; // scope 0 at $DIR/box_expr.rs:6:1: 9:2
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
}
|