blob: 2493e069edd4c5b9c7a903b9fcc503154a9a99eb [file] [log] [blame] [edit]
- // MIR for `on_if` before SsaRangePropagation
+ // MIR for `on_if` after SsaRangePropagation
fn on_if(_1: usize, _2: &[u8]) -> u8 {
debug i => _1;
debug v => _2;
let mut _0: u8;
let mut _3: bool;
let mut _4: usize;
let mut _5: usize;
let mut _6: &[u8];
let _7: usize;
let mut _8: usize;
let mut _9: bool;
scope 1 (inlined core::slice::<impl [u8]>::len) {
scope 2 (inlined std::ptr::metadata::<[u8]>) {
}
}
bb0: {
nop;
StorageLive(_4);
_4 = copy _1;
nop;
StorageLive(_6);
_6 = &(*_2);
_5 = PtrMetadata(copy _2);
StorageDead(_6);
_3 = Lt(copy _1, copy _5);
switchInt(copy _3) -> [0: bb3, otherwise: bb1];
}
bb1: {
nop;
StorageDead(_4);
StorageLive(_7);
_7 = copy _1;
_8 = copy _5;
- _9 = copy _3;
- assert(copy _3, "index out of bounds: the length is {} but the index is {}", copy _5, copy _1) -> [success: bb2, unwind unreachable];
+ _9 = const true;
+ assert(const true, "index out of bounds: the length is {} but the index is {}", copy _5, copy _1) -> [success: bb2, unwind unreachable];
}
bb2: {
_0 = copy (*_2)[_1];
StorageDead(_7);
goto -> bb4;
}
bb3: {
nop;
StorageDead(_4);
_0 = const 0_u8;
goto -> bb4;
}
bb4: {
nop;
return;
}
}