2023-01-01 14:02:51 -06:00
|
|
|
// MIR for `const_dividend` after PreCodegen
|
|
|
|
|
|
|
|
fn const_dividend(_1: i32) -> i32 {
|
|
|
|
debug a => _1; // in scope 0 at $DIR/div_overflow.rs:+0:23: +0:24
|
|
|
|
let mut _0: i32; // return place in scope 0 at $DIR/div_overflow.rs:+0:34: +0:37
|
|
|
|
let mut _2: bool; // in scope 0 at $DIR/div_overflow.rs:+1:5: +1:12
|
|
|
|
|
|
|
|
bb0: {
|
|
|
|
_2 = Eq(_1, const 0_i32); // scope 0 at $DIR/div_overflow.rs:+1:5: +1:12
|
|
|
|
assert(!move _2, "attempt to divide `{}` by zero", const 256_i32) -> bb1; // scope 0 at $DIR/div_overflow.rs:+1:5: +1:12
|
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-01-12 12:23:48 -06:00
|
|
|
_0 = Div(const 256_i32, _1); // scope 0 at $DIR/div_overflow.rs:+1:5: +1:12
|
2023-01-01 14:02:51 -06:00
|
|
|
return; // scope 0 at $DIR/div_overflow.rs:+2:2: +2:2
|
|
|
|
}
|
|
|
|
}
|