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: ();
|
2024-05-30 19:22:40 -05:00
|
|
|
let mut _4: u32;
|
|
|
|
let mut _9: std::option::Option<u32>;
|
|
|
|
let mut _11: &impl Fn(u32);
|
|
|
|
let mut _12: (u32,);
|
|
|
|
let _13: ();
|
2023-04-23 04:38:37 -05:00
|
|
|
scope 1 {
|
2024-05-30 19:22:40 -05:00
|
|
|
debug ((iter: std::ops::Range<u32>).0: u32) => _4;
|
2024-04-14 20:22:35 -05:00
|
|
|
debug ((iter: std::ops::Range<u32>).1: u32) => _2;
|
2024-05-30 19:22:40 -05:00
|
|
|
let _10: u32;
|
2023-04-23 04:38:37 -05:00
|
|
|
scope 2 {
|
2024-05-30 19:22:40 -05:00
|
|
|
debug x => _10;
|
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) {
|
|
|
|
scope 5 (inlined <std::ops::Range<u32> as iter::range::RangeIteratorImpl>::spec_next) {
|
2024-05-30 19:22:40 -05:00
|
|
|
let mut _6: bool;
|
|
|
|
let _7: u32;
|
|
|
|
let mut _8: u32;
|
2023-05-29 14:29:36 -05:00
|
|
|
scope 6 {
|
|
|
|
}
|
2024-02-27 05:57:52 -06:00
|
|
|
scope 7 (inlined std::cmp::impls::<impl PartialOrd for u32>::lt) {
|
2024-05-30 19:22:40 -05:00
|
|
|
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-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2024-05-30 19:22:40 -05:00
|
|
|
StorageLive(_4);
|
|
|
|
_4 = copy _1;
|
2023-06-06 08:47:00 -05:00
|
|
|
goto -> bb1;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2024-05-30 19:22:40 -05:00
|
|
|
StorageLive(_9);
|
2024-04-14 20:22:35 -05:00
|
|
|
StorageLive(_7);
|
|
|
|
StorageLive(_6);
|
|
|
|
StorageLive(_5);
|
2024-05-30 19:22:40 -05:00
|
|
|
_5 = copy _4;
|
|
|
|
_6 = Lt(move _5, copy _2);
|
|
|
|
StorageDead(_5);
|
|
|
|
switchInt(move _6) -> [0: bb2, otherwise: bb4];
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb2: {
|
2024-04-14 20:22:35 -05:00
|
|
|
StorageDead(_6);
|
2023-01-12 14:04:42 -06:00
|
|
|
StorageDead(_7);
|
2024-05-30 19:22:40 -05:00
|
|
|
StorageDead(_9);
|
|
|
|
StorageDead(_4);
|
2023-01-18 11:57:50 -06:00
|
|
|
drop(_3) -> [return: bb3, unwind continue];
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb3: {
|
2023-01-18 11:57:50 -06:00
|
|
|
return;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb4: {
|
2024-05-30 19:22:40 -05:00
|
|
|
_7 = copy _4;
|
|
|
|
StorageLive(_8);
|
|
|
|
_8 = <u32 as Step>::forward_unchecked(copy _7, const 1_usize) -> [return: bb5, unwind: bb7];
|
2023-05-29 14:29:36 -05:00
|
|
|
}
|
|
|
|
|
2023-06-03 07:23:32 -05:00
|
|
|
bb5: {
|
2024-05-30 19:22:40 -05:00
|
|
|
_4 = move _8;
|
|
|
|
StorageDead(_8);
|
|
|
|
_9 = Option::<u32>::Some(copy _7);
|
2024-04-14 20:22:35 -05:00
|
|
|
StorageDead(_6);
|
2024-05-30 19:22:40 -05:00
|
|
|
StorageDead(_7);
|
|
|
|
_10 = copy ((_9 as Some).0: u32);
|
|
|
|
StorageLive(_11);
|
|
|
|
_11 = &_3;
|
|
|
|
StorageLive(_12);
|
|
|
|
_12 = (copy _10,);
|
|
|
|
_13 = <impl Fn(u32) as Fn<(u32,)>>::call(move _11, move _12) -> [return: bb6, unwind: bb7];
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-01-18 11:57:50 -06:00
|
|
|
bb6: {
|
2024-05-30 19:22:40 -05:00
|
|
|
StorageDead(_12);
|
|
|
|
StorageDead(_11);
|
2024-04-14 20:22:35 -05:00
|
|
|
StorageDead(_9);
|
2023-06-06 08:47:00 -05:00
|
|
|
goto -> bb1;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-01-18 11:57:50 -06:00
|
|
|
bb7 (cleanup): {
|
|
|
|
drop(_3) -> [return: bb8, unwind terminate(cleanup)];
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
|
2023-01-18 11:57:50 -06:00
|
|
|
bb8 (cleanup): {
|
2023-06-06 08:47:00 -05:00
|
|
|
resume;
|
2023-04-23 04:38:37 -05:00
|
|
|
}
|
|
|
|
}
|