// MIR for `filter_mapped` after PreCodegen fn filter_mapped(_1: impl Iterator, _2: impl Fn(T) -> Option) -> () { debug iter => _1; debug f => _2; let mut _0: (); let mut _3: std::iter::FilterMap, impl Fn(T) -> Option>; let mut _4: std::iter::FilterMap, impl Fn(T) -> Option>; let mut _5: std::iter::FilterMap, impl Fn(T) -> Option>; let mut _8: std::option::Option; let mut _9: isize; let _11: (); let mut _12: &mut std::iter::FilterMap, impl Fn(T) -> Option>; scope 1 { debug iter => _5; let _10: U; scope 2 { debug x => _10; } scope 4 (inlined , impl Fn(T) -> Option> as Iterator>::next) { debug self => _12; let mut _6: &mut impl Iterator; let mut _7: &mut impl Fn(T) -> Option; } } scope 3 (inlined , impl Fn(T) -> Option> as IntoIterator>::into_iter) { debug self => _3; } bb0: { StorageLive(_4); StorageLive(_3); _3 = as Iterator>::filter_map:: Option>(move _1, move _2) -> [return: bb1, unwind continue]; } bb1: { _4 = move _3; StorageDead(_3); StorageLive(_5); _5 = move _4; goto -> bb2; } bb2: { StorageLive(_8); StorageLive(_6); _6 = &mut (_5.0: impl Iterator); StorageLive(_7); _7 = &mut (_5.1: impl Fn(T) -> Option); _8 = as Iterator>::find_map:: Option>(move _6, move _7) -> [return: bb3, unwind: bb9]; } bb3: { StorageDead(_7); StorageDead(_6); _9 = discriminant(_8); switchInt(move _9) -> [0: bb4, 1: bb6, otherwise: bb8]; } bb4: { StorageDead(_8); drop(_5) -> [return: bb5, unwind continue]; } bb5: { StorageDead(_5); StorageDead(_4); return; } bb6: { _10 = move ((_8 as Some).0: U); _11 = opaque::(move _10) -> [return: bb7, unwind: bb9]; } bb7: { StorageDead(_8); goto -> bb2; } bb8: { unreachable; } bb9 (cleanup): { drop(_5) -> [return: bb10, unwind terminate(cleanup)]; } bb10 (cleanup): { resume; } }