11use crate :: mir:: pretty:: { function_body, pretty_statement, pretty_terminator} ;
22use crate :: ty:: {
3- AdtDef , ClosureDef , Const , CoroutineDef , GenericArgs , Region , RigidTy , Ty , TyKind , VariantIdx ,
3+ AdtDef , ClosureDef , Const , CoroutineDef , GenericArgs , Movability , Region , RigidTy , Ty , TyKind ,
4+ VariantIdx ,
45} ;
56use crate :: { Error , Opaque , Span , Symbol } ;
67use std:: io;
@@ -645,7 +646,9 @@ impl Rvalue {
645646 ) ) ,
646647 AggregateKind :: Adt ( def, _, ref args, _, _) => Ok ( def. ty_with_args ( args) ) ,
647648 AggregateKind :: Closure ( def, ref args) => Ok ( Ty :: new_closure ( def, args. clone ( ) ) ) ,
648- AggregateKind :: Coroutine ( def, ref args) => Ok ( Ty :: new_coroutine ( def, args. clone ( ) ) ) ,
649+ AggregateKind :: Coroutine ( def, ref args, mov) => {
650+ Ok ( Ty :: new_coroutine ( def, args. clone ( ) , mov) )
651+ }
649652 } ,
650653 Rvalue :: ShallowInitBox ( _, ty) => Ok ( Ty :: new_box ( * ty) ) ,
651654 Rvalue :: CopyForDeref ( place) => place. ty ( locals) ,
@@ -659,7 +662,8 @@ pub enum AggregateKind {
659662 Tuple ,
660663 Adt ( AdtDef , VariantIdx , GenericArgs , Option < UserTypeAnnotationIndex > , Option < FieldIdx > ) ,
661664 Closure ( ClosureDef , GenericArgs ) ,
662- Coroutine ( CoroutineDef , GenericArgs ) ,
665+ // FIXME(stable_mir): Movability here is redundant
666+ Coroutine ( CoroutineDef , GenericArgs , Movability ) ,
663667}
664668
665669#[ derive( Clone , Debug , Eq , PartialEq ) ]
0 commit comments