2023-10-19 16:46:28 -05:00
|
|
|
// MIR for `a::{closure#0}` 0 coroutine_resume
|
|
|
|
/* coroutine_layout = CoroutineLayout {
|
2022-12-20 08:15:29 -06:00
|
|
|
field_tys: {},
|
|
|
|
variant_fields: {
|
|
|
|
Unresumed(0): [],
|
|
|
|
Returned (1): [],
|
|
|
|
Panicked (2): [],
|
|
|
|
},
|
|
|
|
storage_conflicts: BitMatrix(0x0) {},
|
|
|
|
} */
|
|
|
|
|
2023-10-16 12:36:39 -05:00
|
|
|
fn a::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:12:14: 12:16}>, _2: &mut Context<'_>) -> Poll<()> {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug _task_context => _4;
|
|
|
|
let mut _0: std::task::Poll<()>;
|
|
|
|
let mut _3: ();
|
|
|
|
let mut _4: &mut std::task::Context<'_>;
|
|
|
|
let mut _5: u32;
|
2022-12-20 08:15:29 -06:00
|
|
|
|
|
|
|
bb0: {
|
2023-10-16 12:36:39 -05:00
|
|
|
_5 = discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16})));
|
2023-01-28 12:49:48 -06:00
|
|
|
switchInt(move _5) -> [0: bb1, 1: bb4, otherwise: bb5];
|
2022-12-20 08:15:29 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_4 = move _2;
|
|
|
|
_3 = const ();
|
2023-01-28 12:49:48 -06:00
|
|
|
goto -> bb3;
|
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_0 = Poll::<()>::Ready(move _3);
|
2023-10-16 12:36:39 -05:00
|
|
|
discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16}))) = 1;
|
2023-06-06 08:47:00 -05:00
|
|
|
return;
|
2022-12-20 08:15:29 -06:00
|
|
|
}
|
|
|
|
|
2023-01-28 12:49:48 -06:00
|
|
|
bb3: {
|
|
|
|
goto -> bb2;
|
2022-12-20 08:15:29 -06:00
|
|
|
}
|
|
|
|
|
2023-01-28 12:49:48 -06:00
|
|
|
bb4: {
|
|
|
|
assert(const false, "`async fn` resumed after completion") -> [success: bb4, unwind unreachable];
|
|
|
|
}
|
|
|
|
|
|
|
|
bb5: {
|
2023-06-06 08:47:00 -05:00
|
|
|
unreachable;
|
2022-12-20 08:15:29 -06:00
|
|
|
}
|
|
|
|
}
|