57 lines
4.2 KiB
Diff
57 lines
4.2 KiB
Diff
- // MIR for `main` before ConstProp
|
|
+ // MIR for `main` after ConstProp
|
|
|
|
fn main() -> () {
|
|
let mut _0: (); // return place in scope 0 at $DIR/const_prop_fails_gracefully.rs:5:11: 5:11
|
|
let _1: usize; // in scope 0 at $DIR/const_prop_fails_gracefully.rs:7:9: 7:10
|
|
let mut _2: *const i32; // in scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:30
|
|
let _3: &i32; // in scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
|
|
let _4: (); // in scope 0 at $DIR/const_prop_fails_gracefully.rs:8:5: 8:12
|
|
let mut _5: usize; // in scope 0 at $DIR/const_prop_fails_gracefully.rs:8:10: 8:11
|
|
scope 1 {
|
|
debug x => _1; // in scope 1 at $DIR/const_prop_fails_gracefully.rs:7:9: 7:10
|
|
}
|
|
|
|
bb0: {
|
|
StorageLive(_1); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:9: 7:10
|
|
StorageLive(_2); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:30
|
|
StorageLive(_3); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
|
|
_3 = const main::FOO; // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
|
|
// ty::Const
|
|
// + ty: &i32
|
|
// + val: Unevaluated(WithOptConstParam { did: DefId(0:5 ~ const_prop_fails_gracefully[317d]::main[0]::FOO[0]), const_param_did: None }, [], None)
|
|
// mir::Constant
|
|
// + span: $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
|
|
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:5 ~ const_prop_fails_gracefully[317d]::main[0]::FOO[0]), const_param_did: None }, [], None) }
|
|
_2 = &raw const (*_3); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
|
|
_1 = move _2 as usize (Misc); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:39
|
|
StorageDead(_2); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:38: 7:39
|
|
StorageDead(_3); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:39: 7:40
|
|
StorageLive(_4); // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:5: 8:12
|
|
StorageLive(_5); // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:10: 8:11
|
|
_5 = _1; // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:10: 8:11
|
|
_4 = const read(move _5) -> bb1; // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:5: 8:12
|
|
// ty::Const
|
|
// + ty: fn(usize) {read}
|
|
// + val: Value(Scalar(<ZST>))
|
|
// mir::Constant
|
|
// + span: $DIR/const_prop_fails_gracefully.rs:8:5: 8:9
|
|
// + literal: Const { ty: fn(usize) {read}, val: Value(Scalar(<ZST>)) }
|
|
}
|
|
|
|
bb1: {
|
|
StorageDead(_5); // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:11: 8:12
|
|
StorageDead(_4); // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:12: 8:13
|
|
_0 = const (); // scope 0 at $DIR/const_prop_fails_gracefully.rs:5:11: 9:2
|
|
// ty::Const
|
|
// + ty: ()
|
|
// + val: Value(Scalar(<ZST>))
|
|
// mir::Constant
|
|
// + span: $DIR/const_prop_fails_gracefully.rs:5:11: 9:2
|
|
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
|
|
StorageDead(_1); // scope 0 at $DIR/const_prop_fails_gracefully.rs:9:1: 9:2
|
|
return; // scope 0 at $DIR/const_prop_fails_gracefully.rs:9:2: 9:2
|
|
}
|
|
}
|
|
|