diff options
Diffstat (limited to 'tests/mir-opt/inline/inline_generator.main.Inline.panic-unwind.diff')
-rw-r--r-- | tests/mir-opt/inline/inline_generator.main.Inline.panic-unwind.diff | 70 |
1 files changed, 39 insertions, 31 deletions
diff --git a/tests/mir-opt/inline/inline_generator.main.Inline.panic-unwind.diff b/tests/mir-opt/inline/inline_generator.main.Inline.panic-unwind.diff index fedcf0423..31744be99 100644 --- a/tests/mir-opt/inline/inline_generator.main.Inline.panic-unwind.diff +++ b/tests/mir-opt/inline/inline_generator.main.Inline.panic-unwind.diff @@ -4,30 +4,28 @@ fn main() -> () { let mut _0: (); let _1: std::ops::GeneratorState<i32, bool>; - let mut _2: std::pin::Pin<&mut [generator@$DIR/inline_generator.rs:16:5: 16:8]>; - let mut _3: &mut [generator@$DIR/inline_generator.rs:16:5: 16:8]; - let mut _4: [generator@$DIR/inline_generator.rs:16:5: 16:8]; + let mut _2: std::pin::Pin<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>; + let mut _3: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8}; + let mut _4: {generator@$DIR/inline_generator.rs:16:5: 16:8}; + let mut _5: bool; scope 1 { debug _r => _1; } + scope 2 (inlined g) { + } -+ scope 3 (inlined Pin::<&mut [generator@$DIR/inline_generator.rs:16:5: 16:8]>::new) { ++ scope 3 (inlined Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>::new) { + debug pointer => _3; + scope 4 { -+ scope 5 (inlined Pin::<&mut [generator@$DIR/inline_generator.rs:16:5: 16:8]>::new_unchecked) { ++ scope 5 (inlined Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>::new_unchecked) { + debug pointer => _3; + } + } + } + scope 6 (inlined g::{closure#0}) { + debug a => _5; -+ let mut _6: &mut [generator@$DIR/inline_generator.rs:16:5: 16:8]; ++ let mut _6: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8}; + let mut _7: u32; + let mut _8: i32; -+ let mut _9: &mut [generator@$DIR/inline_generator.rs:16:5: 16:8]; -+ let mut _10: &mut [generator@$DIR/inline_generator.rs:16:5: 16:8]; + } bb0: { @@ -39,73 +37,83 @@ - } - - bb1: { -+ _4 = [generator@$DIR/inline_generator.rs:16:5: 16:8 (#0)]; ++ _4 = {generator@$DIR/inline_generator.rs:16:5: 16:8 (#0)}; _3 = &mut _4; -- _2 = Pin::<&mut [generator@$DIR/inline_generator.rs:16:5: 16:8]>::new(move _3) -> [return: bb2, unwind: bb4]; +- _2 = Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>::new(move _3) -> [return: bb2, unwind: bb5]; - } - - bb2: { -+ _2 = Pin::<&mut [generator@$DIR/inline_generator.rs:16:5: 16:8]> { pointer: move _3 }; ++ _2 = Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}> { pointer: move _3 }; StorageDead(_3); -- _1 = <[generator@$DIR/inline_generator.rs:16:5: 16:8] as Generator<bool>>::resume(move _2, const false) -> [return: bb3, unwind: bb4]; +- _1 = <{generator@$DIR/inline_generator.rs:16:5: 16:8} as Generator<bool>>::resume(move _2, const false) -> [return: bb3, unwind: bb5]; + StorageLive(_5); + _5 = const false; -+ _6 = deref_copy (_2.0: &mut [generator@$DIR/inline_generator.rs:16:5: 16:8]); ++ _6 = (_2.0: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8}); + _7 = discriminant((*_6)); -+ switchInt(move _7) -> [0: bb3, 1: bb7, 3: bb8, otherwise: bb9]; ++ switchInt(move _7) -> [0: bb5, 1: bb9, 3: bb10, otherwise: bb11]; } - bb3: { + bb1: { + StorageDead(_5); StorageDead(_2); +- drop(_4) -> [return: bb4, unwind: bb6]; ++ drop(_4) -> [return: bb2, unwind: bb4]; + } + +- bb4: { ++ bb2: { StorageDead(_4); _0 = const (); StorageDead(_1); return; } -- bb4 (cleanup): { -+ bb2 (cleanup): { +- bb5 (cleanup): { +- drop(_4) -> [return: bb6, unwind terminate(cleanup)]; ++ bb3 (cleanup): { ++ drop(_4) -> [return: bb4, unwind terminate(cleanup)]; + } + +- bb6 (cleanup): { ++ bb4 (cleanup): { resume; + } + -+ bb3: { ++ bb5: { + StorageLive(_8); -+ switchInt(_5) -> [0: bb4, otherwise: bb5]; ++ switchInt(_5) -> [0: bb6, otherwise: bb7]; + } + -+ bb4: { ++ bb6: { + _8 = const 13_i32; -+ goto -> bb6; ++ goto -> bb8; + } + -+ bb5: { ++ bb7: { + _8 = const 7_i32; -+ goto -> bb6; ++ goto -> bb8; + } + -+ bb6: { ++ bb8: { + _1 = GeneratorState::<i32, bool>::Yielded(move _8); -+ _9 = deref_copy (_2.0: &mut [generator@$DIR/inline_generator.rs:16:5: 16:8]); -+ discriminant((*_9)) = 3; ++ discriminant((*_6)) = 3; + goto -> bb1; + } + -+ bb7: { -+ assert(const false, "generator resumed after completion") -> [success: bb7, unwind: bb2]; ++ bb9: { ++ assert(const false, "generator resumed after completion") -> [success: bb9, unwind: bb3]; + } + -+ bb8: { ++ bb10: { + StorageLive(_8); + StorageDead(_8); + _1 = GeneratorState::<i32, bool>::Complete(_5); -+ _10 = deref_copy (_2.0: &mut [generator@$DIR/inline_generator.rs:16:5: 16:8]); -+ discriminant((*_10)) = 1; ++ discriminant((*_6)) = 1; + goto -> bb1; + } + -+ bb9: { ++ bb11: { + unreachable; } } |