More comments, final tweaks
This commit is contained in:
parent
37184e86ea
commit
c98d6994a3
20 changed files with 169 additions and 42 deletions
|
@ -287,6 +287,13 @@ fn resolve_associated_item<'tcx>(
|
|||
{
|
||||
match *rcvr_args.type_at(0).kind() {
|
||||
ty::CoroutineClosure(coroutine_closure_def_id, args) => {
|
||||
// If we're computing `AsyncFnOnce`/`AsyncFnMut` for a by-ref closure,
|
||||
// or `AsyncFnOnce` for a by-mut closure, then construct a new body that
|
||||
// has the right return types.
|
||||
//
|
||||
// Specifically, `AsyncFnMut` for a by-ref coroutine-closure just needs
|
||||
// to have its input and output types fixed (`&mut self` and returning
|
||||
// `i16` coroutine kind).
|
||||
if target_kind > args.as_coroutine_closure().kind() {
|
||||
Some(Instance {
|
||||
def: ty::InstanceDef::ConstructCoroutineInClosureShim {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue