@@ -1367,7 +1367,7 @@ pub enum sty<'tcx> {
13671367 ty_trait( Box < TyTrait < ' tcx > > ) ,
13681368 ty_struct( DefId , & ' tcx Substs < ' tcx > ) ,
13691369
1370- ty_closure( DefId , & ' tcx Region , & ' tcx Substs < ' tcx > ) ,
1370+ ty_closure( DefId , & ' tcx Substs < ' tcx > ) ,
13711371
13721372 ty_tup( Vec < Ty < ' tcx > > ) ,
13731373
@@ -2658,8 +2658,7 @@ impl FlagComputation {
26582658 }
26592659 }
26602660
2661- & ty_closure( _, region, substs) => {
2662- self . add_region ( * region) ;
2661+ & ty_closure( _, substs) => {
26632662 self . add_substs ( substs) ;
26642663 }
26652664
@@ -2927,10 +2926,9 @@ pub fn mk_struct<'tcx>(cx: &ctxt<'tcx>, struct_id: ast::DefId,
29272926 mk_t ( cx, ty_struct ( struct_id, substs) )
29282927}
29292928
2930- pub fn mk_closure < ' tcx > ( cx : & ctxt < ' tcx > , closure_id : ast:: DefId ,
2931- region : & ' tcx Region , substs : & ' tcx Substs < ' tcx > )
2929+ pub fn mk_closure < ' tcx > ( cx : & ctxt < ' tcx > , closure_id : ast:: DefId , substs : & ' tcx Substs < ' tcx > )
29322930 -> Ty < ' tcx > {
2933- mk_t ( cx, ty_closure ( closure_id, region , substs) )
2931+ mk_t ( cx, ty_closure ( closure_id, substs) )
29342932}
29352933
29362934pub fn mk_var < ' tcx > ( cx : & ctxt < ' tcx > , v : TyVid ) -> Ty < ' tcx > {
@@ -3513,13 +3511,11 @@ pub fn type_contents<'tcx>(cx: &ctxt<'tcx>, ty: Ty<'tcx>) -> TypeContents {
35133511 apply_lang_items ( cx, did, res)
35143512 }
35153513
3516- ty_closure( did, r , substs) => {
3514+ ty_closure( did, substs) => {
35173515 // FIXME(#14449): `borrowed_contents` below assumes `&mut` closure.
35183516 let param_env = ty:: empty_parameter_environment ( cx) ;
35193517 let upvars = closure_upvars ( & param_env, did, substs) . unwrap ( ) ;
3520- TypeContents :: union ( & upvars,
3521- |f| tc_ty ( cx, & f. ty , cache) )
3522- | borrowed_contents ( * r, MutMutable )
3518+ TypeContents :: union ( & upvars, |f| tc_ty ( cx, & f. ty , cache) )
35233519 }
35243520
35253521 ty_tup( ref tys) => {
@@ -5175,7 +5171,7 @@ pub fn ty_to_def_id(ty: Ty) -> Option<ast::DefId> {
51755171 Some ( tt. principal_def_id ( ) ) ,
51765172 ty_struct( id, _) |
51775173 ty_enum( id, _) |
5178- ty_closure( id, _, _ ) =>
5174+ ty_closure( id, _) =>
51795175 Some ( id) ,
51805176 _ =>
51815177 None
@@ -6301,10 +6297,9 @@ pub fn hash_crate_independent<'tcx>(tcx: &ctxt<'tcx>, ty: Ty<'tcx>, svh: &Svh) -
63016297 }
63026298 ty_infer( _) => unreachable ! ( ) ,
63036299 ty_err => byte ! ( 21 ) ,
6304- ty_closure( d, r , _) => {
6300+ ty_closure( d, _) => {
63056301 byte ! ( 22 ) ;
63066302 did ( state, d) ;
6307- region ( state, * r) ;
63086303 }
63096304 ty_projection( ref data) => {
63106305 byte ! ( 23 ) ;
@@ -6618,8 +6613,7 @@ pub fn accumulate_lifetimes_in_type(accumulator: &mut Vec<ty::Region>,
66186613 ty_struct( _, substs) => {
66196614 accum_substs ( accumulator, substs) ;
66206615 }
6621- ty_closure( _, region, substs) => {
6622- accumulator. push ( * region) ;
6616+ ty_closure( _, substs) => {
66236617 accum_substs ( accumulator, substs) ;
66246618 }
66256619 ty_bool |
0 commit comments