@@ -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) ;
@@ -2375,11 +2375,8 @@ impl<'tcx> TypeFoldable<'tcx> for Rvalue<'tcx> {
2375
2375
AggregateKind :: Adt ( def, v, substs. fold_with ( folder) , n) ,
2376
2376
AggregateKind :: Closure ( id, substs) =>
2377
2377
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) ,
2383
2380
} ;
2384
2381
Aggregate ( kind, fields. fold_with ( folder) )
2385
2382
}
@@ -2406,8 +2403,7 @@ impl<'tcx> TypeFoldable<'tcx> for Rvalue<'tcx> {
2406
2403
AggregateKind :: Tuple => false ,
2407
2404
AggregateKind :: Adt ( _, _, substs, _) => substs. visit_with ( visitor) ,
2408
2405
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) ,
2411
2407
} ) || fields. visit_with ( visitor)
2412
2408
}
2413
2409
}
0 commit comments