Add CoroutineClosure to TyKind, AggregateKind, UpvarArgs
This commit is contained in:
parent
a20421734b
commit
c567eddec2
91 changed files with 579 additions and 101 deletions
|
@ -483,6 +483,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||
UpvarArgs::Closure(args) => {
|
||||
Box::new(AggregateKind::Closure(closure_id.to_def_id(), args))
|
||||
}
|
||||
UpvarArgs::CoroutineClosure(args) => {
|
||||
Box::new(AggregateKind::CoroutineClosure(closure_id.to_def_id(), args))
|
||||
}
|
||||
};
|
||||
block.and(Rvalue::Aggregate(result, operands))
|
||||
}
|
||||
|
|
|
@ -495,7 +495,7 @@ fn construct_fn<'tcx>(
|
|||
args.as_coroutine().yield_ty(),
|
||||
args.as_coroutine().resume_ty(),
|
||||
))),
|
||||
ty::Closure(..) | ty::FnDef(..) => None,
|
||||
ty::Closure(..) | ty::CoroutineClosure(..) | ty::FnDef(..) => None,
|
||||
ty => span_bug!(span_with_body, "unexpected type of body: {ty:?}"),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue