mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
36 lines
2.3 KiB
Diff
36 lines
2.3 KiB
Diff
- // MIR for `foo` before ConstProp
|
|
+ // MIR for `foo` after ConstProp
|
|
|
|
fn foo() -> () {
|
|
let mut _0: (); // return place in scope 0 at $DIR/const_prop_miscompile.rs:+0:10: +0:10
|
|
let mut _1: (i32,); // in scope 0 at $DIR/const_prop_miscompile.rs:+1:9: +1:14
|
|
let mut _2: &mut i32; // in scope 0 at $DIR/const_prop_miscompile.rs:+2:6: +2:14
|
|
let mut _4: i32; // in scope 0 at $DIR/const_prop_miscompile.rs:+3:13: +3:20
|
|
scope 1 {
|
|
debug u => _1; // in scope 1 at $DIR/const_prop_miscompile.rs:+1:9: +1:14
|
|
let _3: bool; // in scope 1 at $DIR/const_prop_miscompile.rs:+3:9: +3:10
|
|
scope 2 {
|
|
debug y => _3; // in scope 2 at $DIR/const_prop_miscompile.rs:+3:9: +3:10
|
|
}
|
|
}
|
|
|
|
bb0: {
|
|
StorageLive(_1); // scope 0 at $DIR/const_prop_miscompile.rs:+1:9: +1:14
|
|
_1 = (const 1_i32,); // scope 0 at $DIR/const_prop_miscompile.rs:+1:17: +1:21
|
|
StorageLive(_2); // scope 1 at $DIR/const_prop_miscompile.rs:+2:6: +2:14
|
|
_2 = &mut (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:+2:6: +2:14
|
|
(*_2) = const 5_i32; // scope 1 at $DIR/const_prop_miscompile.rs:+2:5: +2:18
|
|
StorageDead(_2); // scope 1 at $DIR/const_prop_miscompile.rs:+2:18: +2:19
|
|
StorageLive(_3); // scope 1 at $DIR/const_prop_miscompile.rs:+3:9: +3:10
|
|
StorageLive(_4); // scope 1 at $DIR/const_prop_miscompile.rs:+3:13: +3:20
|
|
_4 = (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:+3:15: +3:18
|
|
_3 = Eq(move _4, const 5_i32); // scope 1 at $DIR/const_prop_miscompile.rs:+3:13: +3:25
|
|
StorageDead(_4); // scope 1 at $DIR/const_prop_miscompile.rs:+3:24: +3:25
|
|
_0 = const (); // scope 0 at $DIR/const_prop_miscompile.rs:+0:10: +4:2
|
|
StorageDead(_3); // scope 1 at $DIR/const_prop_miscompile.rs:+4:1: +4:2
|
|
StorageDead(_1); // scope 0 at $DIR/const_prop_miscompile.rs:+4:1: +4:2
|
|
return; // scope 0 at $DIR/const_prop_miscompile.rs:+4:2: +4:2
|
|
}
|
|
}
|
|
|