2023-04-23 04:38:37 -05:00
|
|
|
// MIR for `forward_loop` after PreCodegen
|
|
|
|
|
|
|
|
fn forward_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: ();
|
2023-07-01 04:01:33 -05:00
|
|
|
let mut _4: u32;
|
|
|
|
let mut _7: std::option::Option<u32>;
|
|
|
|
let mut _10: isize;
|
|
|
|
let mut _12: &impl Fn(u32);
|
|
|
|
let mut _13: (u32,);
|
|
|
|
let _14: ();
|
2023-04-23 04:38:37 -05:00
|
|
|
scope 1 {
|
2023-07-01 04:01:33 -05:00
|
|
|
debug iter => std::ops::Range<u32>{ .0 => _4, .1 => _2, };
|
|
|
|
let _11: u32;
|
2023-04-23 04:38:37 -05:00
|
|
|
scope 2 {
|
2023-07-01 04:01:33 -05:00
|
|
|
debug x => _11;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
2023-06-06 08:47:00 -05:00
|
|
|
scope 4 (inlined iter::range::<impl Iterator for std::ops::Range<u32>>::next) {
|
2023-07-01 04:01:33 -05:00
|
|
|
debug self => &std::ops::Range<u32>{ .0 => _4, .1 => _2, };
|
2023-06-06 08:47:00 -05:00
|
|
|
scope 5 (inlined <std::ops::Range<u32> as iter::range::RangeIteratorImpl>::spec_next) {
|
2023-07-01 04:01:33 -05:00
|
|
|
debug self => &std::ops::Range<u32>{ .0 => _4, .1 => _2, };
|
|
|
|
let mut _6: bool;
|
|
|
|
let _8: u32;
|
|
|
|
let mut _9: u32;
|
2023-05-29 14:29:36 -05:00
|
|
|
scope 6 {
|
2023-07-01 04:01:33 -05:00
|
|
|
debug old => _8;
|
2023-05-29 14:29:36 -05:00
|
|
|
scope 7 {
|
|
|
|
}
|
|
|
|
}
|
2023-06-06 08:47:00 -05:00
|
|
|
scope 8 (inlined cmp::impls::<impl PartialOrd for u32>::lt) {
|
2023-07-01 04:01:33 -05:00
|
|
|
debug self => &_4;
|
|
|
|
debug other => &_2;
|
|
|
|
let mut _5: u32;
|
2023-06-03 07:23:32 -05:00
|
|
|
}
|
2023-05-29 14:29:36 -05:00
|
|
|
}
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
}
|
2023-06-06 08:47:00 -05:00
|
|
|
scope 3 (inlined <std::ops::Range<u32> as IntoIterator>::into_iter) {
|
2023-07-01 04:01:33 -05:00
|
|
|
debug self => std::ops::Range<u32>{ .0 => _1, .1 => _2, };
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-07-01 04:01:33 -05:00
|
|
|
StorageLive(_4);
|
|
|
|
_4 = _1;
|
2023-06-06 08:47:00 -05:00
|
|
|
goto -> bb1;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-07-01 04:01:33 -05:00
|
|
|
StorageLive(_7);
|
2023-03-11 09:27:44 -06:00
|
|
|
StorageLive(_8);
|
|
|
|
StorageLive(_6);
|
2023-07-01 04:01:33 -05:00
|
|
|
StorageLive(_5);
|
|
|
|
_5 = _4;
|
|
|
|
_6 = Lt(move _5, _2);
|
|
|
|
StorageDead(_5);
|
|
|
|
switchInt(move _6) -> [0: bb2, otherwise: bb3];
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb2: {
|
2023-07-01 04:01:33 -05:00
|
|
|
_7 = Option::<u32>::None;
|
2023-06-06 08:47:00 -05:00
|
|
|
goto -> bb5;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb3: {
|
2023-07-01 04:01:33 -05:00
|
|
|
_8 = _4;
|
|
|
|
StorageLive(_9);
|
|
|
|
_9 = <u32 as Step>::forward_unchecked(_8, const 1_usize) -> [return: bb4, unwind: bb11];
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb4: {
|
2023-07-01 04:01:33 -05:00
|
|
|
_4 = move _9;
|
|
|
|
StorageDead(_9);
|
|
|
|
_7 = Option::<u32>::Some(_8);
|
2023-06-06 08:47:00 -05:00
|
|
|
goto -> bb5;
|
2023-05-29 14:29:36 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb5: {
|
2023-07-01 04:01:33 -05:00
|
|
|
StorageDead(_6);
|
2023-03-11 09:27:44 -06:00
|
|
|
StorageDead(_8);
|
2023-07-01 04:01:33 -05:00
|
|
|
_10 = discriminant(_7);
|
|
|
|
switchInt(move _10) -> [0: bb6, 1: bb8, otherwise: bb10];
|
2023-05-29 14:29:36 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb6: {
|
2023-07-01 04:01:33 -05:00
|
|
|
StorageDead(_7);
|
|
|
|
StorageDead(_4);
|
2023-06-23 11:53:09 -05:00
|
|
|
drop(_3) -> [return: bb7, unwind continue];
|
2023-05-29 14:29:36 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb7: {
|
2023-06-06 08:47:00 -05:00
|
|
|
return;
|
2023-05-29 14:29:36 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb8: {
|
2023-07-01 04:01:33 -05:00
|
|
|
_11 = ((_7 as Some).0: u32);
|
|
|
|
StorageLive(_12);
|
|
|
|
_12 = &_3;
|
|
|
|
StorageLive(_13);
|
|
|
|
_13 = (_11,);
|
|
|
|
_14 = <impl Fn(u32) as Fn<(u32,)>>::call(move _12, move _13) -> [return: bb9, unwind: bb11];
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb9: {
|
2023-07-01 04:01:33 -05:00
|
|
|
StorageDead(_13);
|
|
|
|
StorageDead(_12);
|
|
|
|
StorageDead(_7);
|
2023-06-06 08:47:00 -05:00
|
|
|
goto -> bb1;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb10: {
|
2023-06-06 08:47:00 -05:00
|
|
|
unreachable;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb11 (cleanup): {
|
2023-06-06 08:47:00 -05:00
|
|
|
drop(_3) -> [return: bb12, unwind terminate];
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb12 (cleanup): {
|
2023-06-06 08:47:00 -05:00
|
|
|
resume;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
}
|