1
Fork 0

Fix ABI for FnMut/Fn impls for async closures

This commit is contained in:
Michael Goulet 2024-02-28 20:25:25 +00:00
parent 05116c5c30
commit f1fef64e19
12 changed files with 81 additions and 18 deletions

View file

@ -282,6 +282,7 @@ fn resolve_associated_item<'tcx>(
Some(Instance {
def: ty::InstanceDef::ConstructCoroutineInClosureShim {
coroutine_closure_def_id,
receiver_by_ref: target_kind != ty::ClosureKind::FnOnce,
},
args,
})
@ -304,6 +305,7 @@ fn resolve_associated_item<'tcx>(
Some(Instance {
def: ty::InstanceDef::ConstructCoroutineInClosureShim {
coroutine_closure_def_id,
receiver_by_ref: false,
},
args,
})