2022-10-15 12:24:02 -05:00
|
|
|
- // MIR for `main` before DataflowConstProp
|
|
|
|
+ // MIR for `main` after DataflowConstProp
|
|
|
|
|
|
|
|
fn main() -> () {
|
2022-10-24 19:27:27 -05:00
|
|
|
let mut _0: (); // return place in scope 0 at $DIR/inherit_overflow.rs:+0:11: +0:11
|
|
|
|
let mut _1: u8; // in scope 0 at $DIR/inherit_overflow.rs:+3:13: +3:47
|
|
|
|
let mut _2: u8; // in scope 0 at $DIR/inherit_overflow.rs:+3:13: +3:47
|
2022-10-15 12:24:02 -05:00
|
|
|
scope 1 {
|
|
|
|
}
|
2022-10-24 19:27:27 -05:00
|
|
|
scope 2 (inlined <u8 as Add>::add) { // at $DIR/inherit_overflow.rs:7:13: 7:47
|
2022-12-04 13:20:55 -06:00
|
|
|
debug self => _1; // in scope 2 at $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
|
|
|
debug other => _2; // in scope 2 at $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
2023-01-29 12:50:33 -06:00
|
|
|
let mut _3: (u8, bool); // in scope 2 at $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
2022-10-15 12:24:02 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-01-29 12:50:33 -06:00
|
|
|
StorageLive(_1); // scope 0 at $DIR/inherit_overflow.rs:+3:13: +3:47
|
2022-12-04 13:20:55 -06:00
|
|
|
_1 = const u8::MAX; // scope 0 at $DIR/inherit_overflow.rs:+3:13: +3:47
|
2023-01-29 12:50:33 -06:00
|
|
|
StorageLive(_2); // scope 0 at $DIR/inherit_overflow.rs:+3:13: +3:47
|
2022-12-04 13:20:55 -06:00
|
|
|
_2 = const 1_u8; // scope 0 at $DIR/inherit_overflow.rs:+3:13: +3:47
|
2023-01-29 12:50:33 -06:00
|
|
|
_3 = CheckedAdd(const u8::MAX, const 1_u8); // scope 2 at $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
|
|
|
assert(!move (_3.1: bool), "attempt to compute `{} + {}`, which would overflow", const u8::MAX, const 1_u8) -> bb1; // scope 2 at $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
2022-10-15 12:24:02 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-01-29 12:50:33 -06:00
|
|
|
StorageDead(_2); // scope 0 at $DIR/inherit_overflow.rs:+3:13: +3:47
|
|
|
|
StorageDead(_1); // scope 0 at $DIR/inherit_overflow.rs:+3:13: +3:47
|
2022-10-24 19:27:27 -05:00
|
|
|
return; // scope 0 at $DIR/inherit_overflow.rs:+4:2: +4:2
|
2022-10-15 12:24:02 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|