1
1
use crate :: mir:: pretty:: { function_body, pretty_statement, pretty_terminator} ;
2
2
use 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 ,
4
5
} ;
5
6
use crate :: { Error , Opaque , Span , Symbol } ;
6
7
use std:: io;
@@ -645,7 +646,9 @@ impl Rvalue {
645
646
) ) ,
646
647
AggregateKind :: Adt ( def, _, ref args, _, _) => Ok ( def. ty_with_args ( args) ) ,
647
648
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
+ }
649
652
} ,
650
653
Rvalue :: ShallowInitBox ( _, ty) => Ok ( Ty :: new_box ( * ty) ) ,
651
654
Rvalue :: CopyForDeref ( place) => place. ty ( locals) ,
@@ -659,7 +662,8 @@ pub enum AggregateKind {
659
662
Tuple ,
660
663
Adt ( AdtDef , VariantIdx , GenericArgs , Option < UserTypeAnnotationIndex > , Option < FieldIdx > ) ,
661
664
Closure ( ClosureDef , GenericArgs ) ,
662
- Coroutine ( CoroutineDef , GenericArgs ) ,
665
+ // FIXME(stable_mir): Movability here is redundant
666
+ Coroutine ( CoroutineDef , GenericArgs , Movability ) ,
663
667
}
664
668
665
669
#[ derive( Clone , Debug , Eq , PartialEq ) ]
0 commit comments