1
Fork 0

Only regular coroutines have movability

This commit is contained in:
Michael Goulet 2023-12-25 16:56:12 +00:00
parent 909dd864f1
commit 3320c09eab
25 changed files with 130 additions and 104 deletions

View file

@ -1554,7 +1554,7 @@ fn coroutine_kind(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<hir::CoroutineK
Node::Expr(&hir::Expr {
kind:
hir::ExprKind::Closure(&rustc_hir::Closure {
kind: hir::ClosureKind::Coroutine(kind, _),
kind: hir::ClosureKind::Coroutine(kind),
..
}),
..

View file

@ -343,7 +343,7 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics {
{
let dummy_args = match kind {
ClosureKind::Closure => &["<closure_kind>", "<closure_signature>", "<upvars>"][..],
ClosureKind::Coroutine(_, _) => {
ClosureKind::Coroutine(_) => {
&["<resume_ty>", "<yield_ty>", "<return_ty>", "<witness>", "<upvars>"][..]
}
};