1
Fork 0

Make async closures directly lower to ClosureKind::CoroutineClosure

This commit is contained in:
Michael Goulet 2024-01-24 17:30:02 +00:00
parent b2bb51734c
commit a20421734b
12 changed files with 93 additions and 88 deletions

View file

@ -349,6 +349,7 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics {
ClosureKind::Coroutine(_) => {
&["<resume_ty>", "<yield_ty>", "<return_ty>", "<witness>", "<upvars>"][..]
}
ClosureKind::CoroutineClosure(_) => todo!(),
};
params.extend(dummy_args.iter().map(|&arg| ty::GenericParamDef {