2023-04-23 04:38:37 -05:00
|
|
|
// MIR for `inclusive_loop` after PreCodegen
|
|
|
|
|
|
|
|
fn inclusive_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug start => _1;
|
|
|
|
debug end => _2;
|
|
|
|
debug f => _3;
|
|
|
|
let mut _0: ();
|
|
|
|
let mut _4: std::ops::RangeInclusive<u32>;
|
|
|
|
let mut _5: std::ops::RangeInclusive<u32>;
|
|
|
|
let mut _6: &mut std::ops::RangeInclusive<u32>;
|
|
|
|
let mut _7: std::option::Option<u32>;
|
|
|
|
let mut _8: isize;
|
|
|
|
let mut _10: &impl Fn(u32);
|
|
|
|
let mut _11: (u32,);
|
|
|
|
let _12: ();
|
2023-04-23 04:38:37 -05:00
|
|
|
scope 1 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug iter => _5;
|
|
|
|
let _9: u32;
|
2023-04-23 04:38:37 -05:00
|
|
|
scope 2 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug x => _9;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
2023-06-06 08:47:00 -05:00
|
|
|
scope 5 (inlined iter::range::<impl Iterator for RangeInclusive<u32>>::next) {
|
|
|
|
debug self => _6;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
}
|
2023-06-06 08:47:00 -05:00
|
|
|
scope 3 (inlined RangeInclusive::<u32>::new) {
|
|
|
|
debug start => _1;
|
|
|
|
debug end => _2;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
2023-06-06 08:47:00 -05:00
|
|
|
scope 4 (inlined <RangeInclusive<u32> as IntoIterator>::into_iter) {
|
|
|
|
debug self => _4;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_4 = RangeInclusive::<u32> { start: _1, end: _2, exhausted: const false };
|
|
|
|
StorageLive(_5);
|
|
|
|
_5 = move _4;
|
|
|
|
goto -> bb1;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_7);
|
2023-03-12 09:10:30 -05:00
|
|
|
StorageLive(_6);
|
2023-06-06 08:47:00 -05:00
|
|
|
_6 = &mut _5;
|
2023-07-16 08:11:10 -05:00
|
|
|
_7 = <RangeInclusive<u32> as iter::range::RangeInclusiveIteratorImpl>::spec_next(move _6) -> [return: bb2, unwind: bb8];
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2023-03-12 09:10:30 -05:00
|
|
|
StorageDead(_6);
|
2023-06-06 08:47:00 -05:00
|
|
|
_8 = discriminant(_7);
|
|
|
|
switchInt(move _8) -> [0: bb3, 1: bb5, otherwise: bb7];
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_7);
|
|
|
|
StorageDead(_5);
|
2023-06-23 11:53:09 -05:00
|
|
|
drop(_3) -> [return: bb4, unwind continue];
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb4: {
|
2023-06-06 08:47:00 -05:00
|
|
|
return;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb5: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_9 = ((_7 as Some).0: u32);
|
|
|
|
StorageLive(_10);
|
|
|
|
_10 = &_3;
|
|
|
|
StorageLive(_11);
|
|
|
|
_11 = (_9,);
|
|
|
|
_12 = <impl Fn(u32) as Fn<(u32,)>>::call(move _10, move _11) -> [return: bb6, unwind: bb8];
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb6: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_11);
|
|
|
|
StorageDead(_10);
|
|
|
|
StorageDead(_7);
|
|
|
|
goto -> bb1;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-05-21 13:44:37 -05:00
|
|
|
bb7: {
|
2023-06-06 08:47:00 -05:00
|
|
|
unreachable;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb8 (cleanup): {
|
2023-06-06 08:47:00 -05:00
|
|
|
drop(_3) -> [return: bb9, unwind terminate];
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-05-21 13:44:37 -05:00
|
|
|
bb9 (cleanup): {
|
2023-06-06 08:47:00 -05:00
|
|
|
resume;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
}
|