// MIR for `forward_loop` after PreCodegen fn forward_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () { debug start => _1; debug end => _2; debug f => _3; let mut _0: (); let mut _4: u32; let mut _9: std::option::Option; let mut _11: &impl Fn(u32); let mut _12: (u32,); let _13: (); scope 1 { debug ((iter: std::ops::Range).0: u32) => _4; debug ((iter: std::ops::Range).1: u32) => _2; let _10: u32; scope 2 { debug x => _10; } scope 4 (inlined iter::range::>::next) { scope 5 (inlined as iter::range::RangeIteratorImpl>::spec_next) { let mut _6: bool; let _7: u32; let mut _8: u32; scope 6 { scope 8 (inlined ::forward_unchecked) { scope 9 (inlined core::num::::unchecked_add) { scope 10 (inlined core::ub_checks::check_language_ub) { scope 11 (inlined core::ub_checks::check_language_ub::runtime) { } } } } } scope 7 (inlined std::cmp::impls::::lt) { let mut _5: u32; } } } } scope 3 (inlined as IntoIterator>::into_iter) { } bb0: { StorageLive(_4); _4 = copy _1; goto -> bb1; } bb1: { StorageLive(_9); StorageLive(_6); StorageLive(_5); _5 = copy _4; _6 = Lt(move _5, copy _2); StorageDead(_5); switchInt(move _6) -> [0: bb2, otherwise: bb4]; } bb2: { StorageDead(_6); StorageDead(_9); StorageDead(_4); drop(_3) -> [return: bb3, unwind continue]; } bb3: { return; } bb4: { _7 = copy _4; StorageLive(_8); _8 = AddUnchecked(copy _7, const 1_u32); _4 = move _8; StorageDead(_8); _9 = Option::::Some(copy _7); StorageDead(_6); _10 = copy ((_9 as Some).0: u32); StorageLive(_11); _11 = &_3; StorageLive(_12); _12 = (copy _10,); _13 = >::call(move _11, move _12) -> [return: bb5, unwind: bb6]; } bb5: { StorageDead(_12); StorageDead(_11); StorageDead(_9); goto -> bb1; } bb6 (cleanup): { drop(_3) -> [return: bb7, unwind terminate(cleanup)]; } bb7 (cleanup): { resume; } }