@@ -27,7 +27,7 @@ use hir::def_id::DefId;
2727use mir:: visit:: MirVisitable ;
2828use mir:: interpret:: { Value , PrimVal , EvalErrorKind } ;
2929use ty:: subst:: { Subst , Substs } ;
30- use ty:: { self , AdtDef , CanonicalTy , ClosureSubsts , Region , Ty , TyCtxt , GeneratorInterior } ;
30+ use ty:: { self , AdtDef , CanonicalTy , ClosureSubsts , GeneratorSubsts , Region , Ty , TyCtxt } ;
3131use ty:: fold:: { TypeFoldable , TypeFolder , TypeVisitor } ;
3232use ty:: TypeAndMut ;
3333use util:: ppaux;
@@ -1641,7 +1641,7 @@ pub enum AggregateKind<'tcx> {
16411641 Adt ( & ' tcx AdtDef , usize , & ' tcx Substs < ' tcx > , Option < usize > ) ,
16421642
16431643 Closure ( DefId , ClosureSubsts < ' tcx > ) ,
1644- Generator ( DefId , ClosureSubsts < ' tcx > , GeneratorInterior < ' tcx > , hir:: GeneratorMovability ) ,
1644+ Generator ( DefId , GeneratorSubsts < ' tcx > , hir:: GeneratorMovability ) ,
16451645}
16461646
16471647#[ derive( Copy , Clone , Debug , PartialEq , Eq , RustcEncodable , RustcDecodable ) ]
@@ -1804,7 +1804,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
18041804 }
18051805 } ) ,
18061806
1807- AggregateKind :: Generator ( def_id, _, _, _ ) => ty:: tls:: with ( |tcx| {
1807+ AggregateKind :: Generator ( def_id, _, _) => ty:: tls:: with ( |tcx| {
18081808 if let Some ( node_id) = tcx. hir . as_local_node_id ( def_id) {
18091809 let name = format ! ( "[generator@{:?}]" , tcx. hir. span( node_id) ) ;
18101810 let mut struct_fmt = fmt. debug_struct ( & name) ;
@@ -2375,11 +2375,8 @@ impl<'tcx> TypeFoldable<'tcx> for Rvalue<'tcx> {
23752375 AggregateKind :: Adt ( def, v, substs. fold_with ( folder) , n) ,
23762376 AggregateKind :: Closure ( id, substs) =>
23772377 AggregateKind :: Closure ( id, substs. fold_with ( folder) ) ,
2378- AggregateKind :: Generator ( id, substs, interior, movablity) =>
2379- AggregateKind :: Generator ( id,
2380- substs. fold_with ( folder) ,
2381- interior. fold_with ( folder) ,
2382- movablity) ,
2378+ AggregateKind :: Generator ( id, substs, movablity) =>
2379+ AggregateKind :: Generator ( id, substs. fold_with ( folder) , movablity) ,
23832380 } ;
23842381 Aggregate ( kind, fields. fold_with ( folder) )
23852382 }
@@ -2406,8 +2403,7 @@ impl<'tcx> TypeFoldable<'tcx> for Rvalue<'tcx> {
24062403 AggregateKind :: Tuple => false ,
24072404 AggregateKind :: Adt ( _, _, substs, _) => substs. visit_with ( visitor) ,
24082405 AggregateKind :: Closure ( _, substs) => substs. visit_with ( visitor) ,
2409- AggregateKind :: Generator ( _, substs, interior, _) => substs. visit_with ( visitor) ||
2410- interior. visit_with ( visitor) ,
2406+ AggregateKind :: Generator ( _, substs, _) => substs. visit_with ( visitor) ,
24112407 } ) || fields. visit_with ( visitor)
24122408 }
24132409 }
0 commit comments