@@ -27,7 +27,7 @@ use hir::def_id::DefId;
27
27
use mir:: visit:: MirVisitable ;
28
28
use mir:: interpret:: { Value , PrimVal , EvalErrorKind } ;
29
29
use 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 } ;
31
31
use ty:: fold:: { TypeFoldable , TypeFolder , TypeVisitor } ;
32
32
use ty:: TypeAndMut ;
33
33
use util:: ppaux;
@@ -1641,7 +1641,7 @@ pub enum AggregateKind<'tcx> {
1641
1641
Adt ( & ' tcx AdtDef , usize , & ' tcx Substs < ' tcx > , Option < usize > ) ,
1642
1642
1643
1643
Closure ( DefId , ClosureSubsts < ' tcx > ) ,
1644
- Generator ( DefId , ClosureSubsts < ' tcx > , GeneratorInterior < ' tcx > , hir:: GeneratorMovability ) ,
1644
+ Generator ( DefId , GeneratorSubsts < ' tcx > , hir:: GeneratorMovability ) ,
1645
1645
}
1646
1646
1647
1647
#[ derive( Copy , Clone , Debug , PartialEq , Eq , RustcEncodable , RustcDecodable ) ]
@@ -1804,7 +1804,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
1804
1804
}
1805
1805
} ) ,
1806
1806
1807
- AggregateKind :: Generator ( def_id, _, _, _ ) => ty:: tls:: with ( |tcx| {
1807
+ AggregateKind :: Generator ( def_id, _, _) => ty:: tls:: with ( |tcx| {
1808
1808
if let Some ( node_id) = tcx. hir . as_local_node_id ( def_id) {
1809
1809
let name = format ! ( "[generator@{:?}]" , tcx. hir. span( node_id) ) ;
1810
1810
let mut struct_fmt = fmt. debug_struct ( & name) ;
@@ -2370,11 +2370,8 @@ impl<'tcx> TypeFoldable<'tcx> for Rvalue<'tcx> {
2370
2370
AggregateKind :: Adt ( def, v, substs. fold_with ( folder) , n) ,
2371
2371
AggregateKind :: Closure ( id, substs) =>
2372
2372
AggregateKind :: Closure ( id, substs. fold_with ( folder) ) ,
2373
- AggregateKind :: Generator ( id, substs, interior, movablity) =>
2374
- AggregateKind :: Generator ( id,
2375
- substs. fold_with ( folder) ,
2376
- interior. fold_with ( folder) ,
2377
- movablity) ,
2373
+ AggregateKind :: Generator ( id, substs, movablity) =>
2374
+ AggregateKind :: Generator ( id, substs. fold_with ( folder) , movablity) ,
2378
2375
} ;
2379
2376
Aggregate ( kind, fields. fold_with ( folder) )
2380
2377
}
@@ -2401,8 +2398,7 @@ impl<'tcx> TypeFoldable<'tcx> for Rvalue<'tcx> {
2401
2398
AggregateKind :: Tuple => false ,
2402
2399
AggregateKind :: Adt ( _, _, substs, _) => substs. visit_with ( visitor) ,
2403
2400
AggregateKind :: Closure ( _, substs) => substs. visit_with ( visitor) ,
2404
- AggregateKind :: Generator ( _, substs, interior, _) => substs. visit_with ( visitor) ||
2405
- interior. visit_with ( visitor) ,
2401
+ AggregateKind :: Generator ( _, substs, _) => substs. visit_with ( visitor) ,
2406
2402
} ) || fields. visit_with ( visitor)
2407
2403
}
2408
2404
}
0 commit comments