1
Fork 0

Restore movability to SMIR

This commit is contained in:
Michael Goulet 2023-12-25 17:04:14 +00:00
parent fcb42b42d6
commit 15ccf2e7bd
7 changed files with 16 additions and 9 deletions

View file

@ -58,8 +58,8 @@ impl Ty {
}
/// Create a new coroutine type.
pub fn new_coroutine(def: CoroutineDef, args: GenericArgs) -> Ty {
Ty::from_rigid_kind(RigidTy::Coroutine(def, args))
pub fn new_coroutine(def: CoroutineDef, args: GenericArgs, mov: Movability) -> Ty {
Ty::from_rigid_kind(RigidTy::Coroutine(def, args, mov))
}
/// Create a new box type that represents `Box<T>`, for the given inner type `T`.
@ -460,7 +460,8 @@ pub enum RigidTy {
FnDef(FnDef, GenericArgs),
FnPtr(PolyFnSig),
Closure(ClosureDef, GenericArgs),
Coroutine(CoroutineDef, GenericArgs),
// FIXME(stable_mir): Movability here is redundant
Coroutine(CoroutineDef, GenericArgs, Movability),
Dynamic(Vec<Binder<ExistentialPredicate>>, Region, DynKind),
Never,
Tuple(Vec<Ty>),