Remove movability from TyKind::Coroutine
This commit is contained in:
parent
f4d794ea0b
commit
fcb42b42d6
84 changed files with 212 additions and 220 deletions
|
@ -646,7 +646,7 @@ fn construct_error(tcx: TyCtxt<'_>, def_id: LocalDefId, guar: ErrorGuaranteed) -
|
|||
}
|
||||
DefKind::Closure if coroutine_kind.is_some() => {
|
||||
let coroutine_ty = tcx.type_of(def_id).instantiate_identity();
|
||||
let ty::Coroutine(_, args, _) = coroutine_ty.kind() else {
|
||||
let ty::Coroutine(_, args) = coroutine_ty.kind() else {
|
||||
bug!("expected type of coroutine-like closure to be a coroutine")
|
||||
};
|
||||
let args = args.as_coroutine();
|
||||
|
@ -813,7 +813,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||
|
||||
let upvar_args = match closure_ty.kind() {
|
||||
ty::Closure(_, args) => ty::UpvarArgs::Closure(args),
|
||||
ty::Coroutine(_, args, _) => ty::UpvarArgs::Coroutine(args),
|
||||
ty::Coroutine(_, args) => ty::UpvarArgs::Coroutine(args),
|
||||
_ => return,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue