3010fa9afb
This makes `-Zprint-type-sizes`'s output easier to read, because the
name of an `async fn` is more immediately recognizable than its span.
I also deleted the comment "FIXME(eddyb) should use `def_span`." because
it appears to have already been fixed by commit 67727aa7c3
.
48 lines
1.1 KiB
Rust
48 lines
1.1 KiB
Rust
// MIR for `a::{closure#0}` 0 coroutine_resume
|
|
/* coroutine_layout = CoroutineLayout {
|
|
field_tys: {},
|
|
variant_fields: {
|
|
Unresumed(0): [],
|
|
Returned (1): [],
|
|
Panicked (2): [],
|
|
},
|
|
storage_conflicts: BitMatrix(0x0) {},
|
|
} */
|
|
|
|
fn a::{closure#0}(_1: Pin<&mut {async fn body of a()}>, _2: &mut Context<'_>) -> Poll<()> {
|
|
debug _task_context => _4;
|
|
let mut _0: std::task::Poll<()>;
|
|
let mut _3: ();
|
|
let mut _4: &mut std::task::Context<'_>;
|
|
let mut _5: u32;
|
|
|
|
bb0: {
|
|
_5 = discriminant((*(_1.0: &mut {async fn body of a()})));
|
|
switchInt(move _5) -> [0: bb1, 1: bb4, otherwise: bb5];
|
|
}
|
|
|
|
bb1: {
|
|
_4 = move _2;
|
|
_3 = const ();
|
|
goto -> bb3;
|
|
}
|
|
|
|
bb2: {
|
|
_0 = Poll::<()>::Ready(move _3);
|
|
discriminant((*(_1.0: &mut {async fn body of a()}))) = 1;
|
|
return;
|
|
}
|
|
|
|
bb3: {
|
|
goto -> bb2;
|
|
}
|
|
|
|
bb4: {
|
|
assert(const false, "`async fn` resumed after completion") -> [success: bb4, unwind unreachable];
|
|
}
|
|
|
|
bb5: {
|
|
unreachable;
|
|
}
|
|
}
|