summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir')
-rw-r--r--tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir54
1 files changed, 25 insertions, 29 deletions
diff --git a/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir b/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir
index ad4e5c6fc..7cce3415f 100644
--- a/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir
+++ b/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir
@@ -4,7 +4,7 @@
_0: GeneratorSavedTy {
ty: impl std::future::Future<Output = ()>,
source_info: SourceInfo {
- span: $DIR/async_await.rs:15:8: 15:14 (#9),
+ span: $DIR/async_await.rs:15:8: 15:14 (#8),
scope: scope[0],
},
ignore_for_traits: false,
@@ -12,7 +12,7 @@
_1: GeneratorSavedTy {
ty: impl std::future::Future<Output = ()>,
source_info: SourceInfo {
- span: $DIR/async_await.rs:16:8: 16:14 (#12),
+ span: $DIR/async_await.rs:16:8: 16:14 (#11),
scope: scope[0],
},
ignore_for_traits: false,
@@ -90,7 +90,7 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
bb0: {
_39 = discriminant((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2]))); // scope 0 at $DIR/async_await.rs:+0:18: +3:2
- switchInt(move _39) -> [0: bb1, 1: bb29, 3: bb27, 4: bb28, otherwise: bb30]; // scope 0 at $DIR/async_await.rs:+0:18: +3:2
+ switchInt(move _39) -> [0: bb1, 1: bb28, 3: bb26, 4: bb27, otherwise: bb29]; // scope 0 at $DIR/async_await.rs:+0:18: +3:2
}
bb1: {
@@ -98,14 +98,14 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
StorageLive(_3); // scope 0 at $DIR/async_await.rs:+1:5: +1:14
StorageLive(_4); // scope 0 at $DIR/async_await.rs:+1:8: +1:14
StorageLive(_5); // scope 0 at $DIR/async_await.rs:+1:5: +1:8
- _5 = a() -> bb2; // scope 0 at $DIR/async_await.rs:+1:5: +1:8
+ _5 = a() -> [return: bb2, unwind unreachable]; // scope 0 at $DIR/async_await.rs:+1:5: +1:8
// mir::Constant
// + span: $DIR/async_await.rs:15:5: 15:6
// + literal: Const { ty: fn() -> impl Future<Output = ()> {a}, val: Value(<ZST>) }
}
bb2: {
- _4 = <impl Future<Output = ()> as IntoFuture>::into_future(move _5) -> bb3; // scope 0 at $DIR/async_await.rs:+1:8: +1:14
+ _4 = <impl Future<Output = ()> as IntoFuture>::into_future(move _5) -> [return: bb3, unwind unreachable]; // scope 0 at $DIR/async_await.rs:+1:8: +1:14
// mir::Constant
// + span: $DIR/async_await.rs:15:8: 15:14
// + literal: Const { ty: fn(impl Future<Output = ()>) -> <impl Future<Output = ()> as IntoFuture>::IntoFuture {<impl Future<Output = ()> as IntoFuture>::into_future}, val: Value(<ZST>) }
@@ -126,7 +126,7 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
StorageLive(_12); // scope 2 at $DIR/async_await.rs:+1:8: +1:14
_12 = &mut (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#3).0: impl std::future::Future<Output = ()>); // scope 2 at $DIR/async_await.rs:+1:8: +1:14
_11 = &mut (*_12); // scope 2 at $DIR/async_await.rs:+1:8: +1:14
- _10 = Pin::<&mut impl Future<Output = ()>>::new_unchecked(move _11) -> bb5; // scope 2 at $DIR/async_await.rs:+1:8: +1:14
+ _10 = Pin::<&mut impl Future<Output = ()>>::new_unchecked(move _11) -> [return: bb5, unwind unreachable]; // scope 2 at $DIR/async_await.rs:+1:8: +1:14
// mir::Constant
// + span: $DIR/async_await.rs:15:8: 15:14
// + literal: Const { ty: unsafe fn(&mut impl Future<Output = ()>) -> Pin<&mut impl Future<Output = ()>> {Pin::<&mut impl Future<Output = ()>>::new_unchecked}, val: Value(<ZST>) }
@@ -145,7 +145,7 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
bb6: {
_13 = &mut (*_14); // scope 2 at $DIR/async_await.rs:+1:5: +1:14
StorageDead(_15); // scope 2 at $DIR/async_await.rs:+1:13: +1:14
- _9 = <impl Future<Output = ()> as Future>::poll(move _10, move _13) -> bb7; // scope 2 at $DIR/async_await.rs:+1:8: +1:14
+ _9 = <impl Future<Output = ()> as Future>::poll(move _10, move _13) -> [return: bb7, unwind unreachable]; // scope 2 at $DIR/async_await.rs:+1:8: +1:14
// mir::Constant
// + span: $DIR/async_await.rs:15:8: 15:14
// + literal: Const { ty: for<'a, 'b, 'c> fn(Pin<&'a mut impl Future<Output = ()>>, &'b mut Context<'c>) -> Poll<<impl Future<Output = ()> as Future>::Output> {<impl Future<Output = ()> as Future>::poll}, val: Value(<ZST>) }
@@ -206,14 +206,14 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
StorageDead(_3); // scope 0 at $DIR/async_await.rs:+1:14: +1:15
StorageLive(_21); // scope 0 at $DIR/async_await.rs:+2:8: +2:14
StorageLive(_22); // scope 0 at $DIR/async_await.rs:+2:5: +2:8
- _22 = a() -> bb14; // scope 0 at $DIR/async_await.rs:+2:5: +2:8
+ _22 = a() -> [return: bb14, unwind unreachable]; // scope 0 at $DIR/async_await.rs:+2:5: +2:8
// mir::Constant
// + span: $DIR/async_await.rs:16:5: 16:6
// + literal: Const { ty: fn() -> impl Future<Output = ()> {a}, val: Value(<ZST>) }
}
bb14: {
- _21 = <impl Future<Output = ()> as IntoFuture>::into_future(move _22) -> bb15; // scope 0 at $DIR/async_await.rs:+2:8: +2:14
+ _21 = <impl Future<Output = ()> as IntoFuture>::into_future(move _22) -> [return: bb15, unwind unreachable]; // scope 0 at $DIR/async_await.rs:+2:8: +2:14
// mir::Constant
// + span: $DIR/async_await.rs:16:8: 16:14
// + literal: Const { ty: fn(impl Future<Output = ()>) -> <impl Future<Output = ()> as IntoFuture>::IntoFuture {<impl Future<Output = ()> as IntoFuture>::into_future}, val: Value(<ZST>) }
@@ -234,7 +234,7 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
StorageLive(_28); // scope 5 at $DIR/async_await.rs:+2:8: +2:14
_28 = &mut (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#4).0: impl std::future::Future<Output = ()>); // scope 5 at $DIR/async_await.rs:+2:8: +2:14
_27 = &mut (*_28); // scope 5 at $DIR/async_await.rs:+2:8: +2:14
- _26 = Pin::<&mut impl Future<Output = ()>>::new_unchecked(move _27) -> bb17; // scope 5 at $DIR/async_await.rs:+2:8: +2:14
+ _26 = Pin::<&mut impl Future<Output = ()>>::new_unchecked(move _27) -> [return: bb17, unwind unreachable]; // scope 5 at $DIR/async_await.rs:+2:8: +2:14
// mir::Constant
// + span: $DIR/async_await.rs:16:8: 16:14
// + literal: Const { ty: unsafe fn(&mut impl Future<Output = ()>) -> Pin<&mut impl Future<Output = ()>> {Pin::<&mut impl Future<Output = ()>>::new_unchecked}, val: Value(<ZST>) }
@@ -253,7 +253,7 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
bb18: {
_29 = &mut (*_30); // scope 5 at $DIR/async_await.rs:+2:5: +2:14
StorageDead(_31); // scope 5 at $DIR/async_await.rs:+2:13: +2:14
- _25 = <impl Future<Output = ()> as Future>::poll(move _26, move _29) -> bb19; // scope 5 at $DIR/async_await.rs:+2:8: +2:14
+ _25 = <impl Future<Output = ()> as Future>::poll(move _26, move _29) -> [return: bb19, unwind unreachable]; // scope 5 at $DIR/async_await.rs:+2:8: +2:14
// mir::Constant
// + span: $DIR/async_await.rs:16:8: 16:14
// + literal: Const { ty: for<'a, 'b, 'c> fn(Pin<&'a mut impl Future<Output = ()>>, &'b mut Context<'c>) -> Poll<<impl Future<Output = ()> as Future>::Output> {<impl Future<Output = ()> as Future>::poll}, val: Value(<ZST>) }
@@ -263,7 +263,7 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
StorageDead(_29); // scope 5 at $DIR/async_await.rs:+2:13: +2:14
StorageDead(_26); // scope 5 at $DIR/async_await.rs:+2:13: +2:14
_32 = discriminant(_25); // scope 4 at $DIR/async_await.rs:+2:8: +2:14
- switchInt(move _32) -> [0: bb22, 1: bb20, otherwise: bb21]; // scope 4 at $DIR/async_await.rs:+2:8: +2:14
+ switchInt(move _32) -> [0: bb21, 1: bb20, otherwise: bb9]; // scope 4 at $DIR/async_await.rs:+2:8: +2:14
}
bb20: {
@@ -281,10 +281,6 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
}
bb21: {
- unreachable; // scope 4 at $DIR/async_await.rs:+2:8: +2:14
- }
-
- bb22: {
StorageLive(_33); // scope 4 at $DIR/async_await.rs:+2:5: +2:14
_33 = ((_25 as Ready).0: ()); // scope 4 at $DIR/async_await.rs:+2:5: +2:14
_37 = _33; // scope 6 at $DIR/async_await.rs:+2:5: +2:14
@@ -293,10 +289,10 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
StorageDead(_28); // scope 4 at $DIR/async_await.rs:+2:13: +2:14
StorageDead(_25); // scope 4 at $DIR/async_await.rs:+2:13: +2:14
StorageDead(_24); // scope 4 at $DIR/async_await.rs:+2:13: +2:14
- goto -> bb24; // scope 0 at $DIR/async_await.rs:+2:13: +2:14
+ goto -> bb23; // scope 0 at $DIR/async_await.rs:+2:13: +2:14
}
- bb23: {
+ bb22: {
StorageDead(_36); // scope 4 at $DIR/async_await.rs:+2:13: +2:14
_38 = move _35; // scope 4 at $DIR/async_await.rs:+2:8: +2:14
StorageDead(_35); // scope 4 at $DIR/async_await.rs:+2:13: +2:14
@@ -304,23 +300,23 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
goto -> bb16; // scope 4 at $DIR/async_await.rs:+2:8: +2:14
}
- bb24: {
+ bb23: {
nop; // scope 0 at $DIR/async_await.rs:+2:13: +2:14
- goto -> bb25; // scope 0 at $DIR/async_await.rs:+3:1: +3:2
+ goto -> bb24; // scope 0 at $DIR/async_await.rs:+3:1: +3:2
}
- bb25: {
+ bb24: {
StorageDead(_21); // scope 0 at $DIR/async_await.rs:+3:1: +3:2
- goto -> bb26; // scope 0 at $DIR/async_await.rs:+3:1: +3:2
+ goto -> bb25; // scope 0 at $DIR/async_await.rs:+3:1: +3:2
}
- bb26: {
+ bb25: {
_0 = Poll::<()>::Ready(move _37); // scope 0 at $DIR/async_await.rs:+3:2: +3:2
discriminant((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2]))) = 1; // scope 0 at $DIR/async_await.rs:+3:2: +3:2
return; // scope 0 at $DIR/async_await.rs:+3:2: +3:2
}
- bb27: {
+ bb26: {
StorageLive(_3); // scope 0 at $DIR/async_await.rs:+0:18: +3:2
StorageLive(_4); // scope 0 at $DIR/async_await.rs:+0:18: +3:2
StorageLive(_19); // scope 0 at $DIR/async_await.rs:+0:18: +3:2
@@ -329,19 +325,19 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
goto -> bb11; // scope 0 at $DIR/async_await.rs:+0:18: +3:2
}
- bb28: {
+ bb27: {
StorageLive(_21); // scope 0 at $DIR/async_await.rs:+0:18: +3:2
StorageLive(_35); // scope 0 at $DIR/async_await.rs:+0:18: +3:2
StorageLive(_36); // scope 0 at $DIR/async_await.rs:+0:18: +3:2
_35 = move _2; // scope 0 at $DIR/async_await.rs:+0:18: +3:2
- goto -> bb23; // scope 0 at $DIR/async_await.rs:+0:18: +3:2
+ goto -> bb22; // scope 0 at $DIR/async_await.rs:+0:18: +3:2
}
- bb29: {
- assert(const false, "`async fn` resumed after completion") -> bb29; // scope 0 at $DIR/async_await.rs:+0:18: +3:2
+ bb28: {
+ assert(const false, "`async fn` resumed after completion") -> bb28; // scope 0 at $DIR/async_await.rs:+0:18: +3:2
}
- bb30: {
+ bb29: {
unreachable; // scope 0 at $DIR/async_await.rs:+0:18: +3:2
}
}