59 lines
3.4 KiB
Diff
59 lines
3.4 KiB
Diff
- // MIR for `main` before ConstProp
|
|
+ // MIR for `main` after ConstProp
|
|
|
|
fn main() -> () {
|
|
let mut _0: (); // return place in scope 0 at $DIR/boxes.rs:11:11: 11:11
|
|
let _1: i32; // in scope 0 at $DIR/boxes.rs:12:9: 12:10
|
|
let mut _2: i32; // in scope 0 at $DIR/boxes.rs:12:13: 12:22
|
|
let mut _3: std::boxed::Box<i32>; // in scope 0 at $DIR/boxes.rs:12:14: 12:22
|
|
let mut _4: std::boxed::Box<i32>; // in scope 0 at $DIR/boxes.rs:12:14: 12:22
|
|
scope 1 {
|
|
debug x => _1; // in scope 1 at $DIR/boxes.rs:12:9: 12:10
|
|
}
|
|
|
|
bb0: {
|
|
StorageLive(_1); // scope 0 at $DIR/boxes.rs:12:9: 12:10
|
|
StorageLive(_2); // scope 0 at $DIR/boxes.rs:12:13: 12:22
|
|
StorageLive(_3); // scope 0 at $DIR/boxes.rs:12:14: 12:22
|
|
StorageLive(_4); // scope 0 at $DIR/boxes.rs:12:14: 12:22
|
|
_4 = Box(i32); // scope 0 at $DIR/boxes.rs:12:14: 12:22
|
|
(*_4) = const 42_i32; // scope 0 at $DIR/boxes.rs:12:19: 12:21
|
|
// ty::Const
|
|
// + ty: i32
|
|
// + val: Value(Scalar(0x0000002a))
|
|
// mir::Constant
|
|
// + span: $DIR/boxes.rs:12:19: 12:21
|
|
// + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) }
|
|
_3 = move _4; // scope 0 at $DIR/boxes.rs:12:14: 12:22
|
|
StorageDead(_4); // scope 0 at $DIR/boxes.rs:12:21: 12:22
|
|
_2 = (*_3); // scope 0 at $DIR/boxes.rs:12:13: 12:22
|
|
_1 = Add(move _2, const 0_i32); // scope 0 at $DIR/boxes.rs:12:13: 12:26
|
|
// ty::Const
|
|
// + ty: i32
|
|
// + val: Value(Scalar(0x00000000))
|
|
// mir::Constant
|
|
// + span: $DIR/boxes.rs:12:25: 12:26
|
|
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
|
|
StorageDead(_2); // scope 0 at $DIR/boxes.rs:12:25: 12:26
|
|
drop(_3) -> [return: bb2, unwind: bb1]; // scope 0 at $DIR/boxes.rs:12:26: 12:27
|
|
}
|
|
|
|
bb1 (cleanup): {
|
|
resume; // scope 0 at $DIR/boxes.rs:11:1: 13:2
|
|
}
|
|
|
|
bb2: {
|
|
StorageDead(_3); // scope 0 at $DIR/boxes.rs:12:26: 12:27
|
|
_0 = const (); // scope 0 at $DIR/boxes.rs:11:11: 13:2
|
|
// ty::Const
|
|
// + ty: ()
|
|
// + val: Value(Scalar(<ZST>))
|
|
// mir::Constant
|
|
// + span: $DIR/boxes.rs:11:11: 13:2
|
|
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
|
|
StorageDead(_1); // scope 0 at $DIR/boxes.rs:13:1: 13:2
|
|
return; // scope 0 at $DIR/boxes.rs:13:2: 13:2
|
|
}
|
|
}
|
|
|