fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// MIR for `mapped` after PreCodegen 2 3fn mapped(_1: impl Iterator<Item = T>, _2: impl Fn(T) -> U) -> () { 4 debug iter => _1; 5 debug f => _2; 6 let mut _0: (); 7 let mut _3: std::iter::Map<impl Iterator<Item = T>, impl Fn(T) -> U>; 8 let mut _4: std::iter::Map<impl Iterator<Item = T>, impl Fn(T) -> U>; 9 let mut _5: std::iter::Map<impl Iterator<Item = T>, impl Fn(T) -> U>; 10 let mut _6: &mut std::iter::Map<impl Iterator<Item = T>, impl Fn(T) -> U>; 11 let mut _7: std::option::Option<U>; 12 let mut _8: isize; 13 let _10: (); 14 scope 1 { 15 debug iter => _5; 16 let _9: U; 17 scope 2 { 18 debug x => _9; 19 } 20 } 21 scope 3 (inlined <Map<impl Iterator<Item = T>, impl Fn(T) -> U> as IntoIterator>::into_iter) { 22 debug self => _3; 23 } 24 25 bb0: { 26 StorageLive(_4); 27 StorageLive(_3); 28 _3 = <impl Iterator<Item = T> as Iterator>::map::<U, impl Fn(T) -> U>(move _1, move _2) -> [return: bb1, unwind continue]; 29 } 30 31 bb1: { 32 _4 = move _3; 33 StorageDead(_3); 34 StorageLive(_5); 35 _5 = move _4; 36 goto -> bb2; 37 } 38 39 bb2: { 40 StorageLive(_7); 41 StorageLive(_6); 42 _6 = &mut _5; 43 _7 = <Map<impl Iterator<Item = T>, impl Fn(T) -> U> as Iterator>::next(move _6) -> [return: bb3, unwind: bb9]; 44 } 45 46 bb3: { 47 StorageDead(_6); 48 _8 = discriminant(_7); 49 switchInt(move _8) -> [0: bb4, 1: bb6, otherwise: bb8]; 50 } 51 52 bb4: { 53 StorageDead(_7); 54 drop(_5) -> [return: bb5, unwind continue]; 55 } 56 57 bb5: { 58 StorageDead(_5); 59 StorageDead(_4); 60 return; 61 } 62 63 bb6: { 64 _9 = move ((_7 as Some).0: U); 65 _10 = opaque::<U>(move _9) -> [return: bb7, unwind: bb9]; 66 } 67 68 bb7: { 69 StorageDead(_7); 70 goto -> bb2; 71 } 72 73 bb8: { 74 unreachable; 75 } 76 77 bb9 (cleanup): { 78 drop(_5) -> [return: bb10, unwind terminate(cleanup)]; 79 } 80 81 bb10 (cleanup): { 82 resume; 83 } 84}