@@ -1367,7 +1367,7 @@ pub enum sty<'tcx> {
1367
1367
ty_trait( Box < TyTrait < ' tcx > > ) ,
1368
1368
ty_struct( DefId , & ' tcx Substs < ' tcx > ) ,
1369
1369
1370
- ty_closure( DefId , & ' tcx Region , & ' tcx Substs < ' tcx > ) ,
1370
+ ty_closure( DefId , & ' tcx Substs < ' tcx > ) ,
1371
1371
1372
1372
ty_tup( Vec < Ty < ' tcx > > ) ,
1373
1373
@@ -2658,8 +2658,7 @@ impl FlagComputation {
2658
2658
}
2659
2659
}
2660
2660
2661
- & ty_closure( _, region, substs) => {
2662
- self . add_region ( * region) ;
2661
+ & ty_closure( _, substs) => {
2663
2662
self . add_substs ( substs) ;
2664
2663
}
2665
2664
@@ -2927,10 +2926,9 @@ pub fn mk_struct<'tcx>(cx: &ctxt<'tcx>, struct_id: ast::DefId,
2927
2926
mk_t ( cx, ty_struct ( struct_id, substs) )
2928
2927
}
2929
2928
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 > )
2932
2930
-> Ty < ' tcx > {
2933
- mk_t ( cx, ty_closure ( closure_id, region , substs) )
2931
+ mk_t ( cx, ty_closure ( closure_id, substs) )
2934
2932
}
2935
2933
2936
2934
pub 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 {
3513
3511
apply_lang_items ( cx, did, res)
3514
3512
}
3515
3513
3516
- ty_closure( did, r , substs) => {
3514
+ ty_closure( did, substs) => {
3517
3515
// FIXME(#14449): `borrowed_contents` below assumes `&mut` closure.
3518
3516
let param_env = ty:: empty_parameter_environment ( cx) ;
3519
3517
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) )
3523
3519
}
3524
3520
3525
3521
ty_tup( ref tys) => {
@@ -5175,7 +5171,7 @@ pub fn ty_to_def_id(ty: Ty) -> Option<ast::DefId> {
5175
5171
Some ( tt. principal_def_id ( ) ) ,
5176
5172
ty_struct( id, _) |
5177
5173
ty_enum( id, _) |
5178
- ty_closure( id, _, _ ) =>
5174
+ ty_closure( id, _) =>
5179
5175
Some ( id) ,
5180
5176
_ =>
5181
5177
None
@@ -6301,10 +6297,9 @@ pub fn hash_crate_independent<'tcx>(tcx: &ctxt<'tcx>, ty: Ty<'tcx>, svh: &Svh) -
6301
6297
}
6302
6298
ty_infer( _) => unreachable ! ( ) ,
6303
6299
ty_err => byte ! ( 21 ) ,
6304
- ty_closure( d, r , _) => {
6300
+ ty_closure( d, _) => {
6305
6301
byte ! ( 22 ) ;
6306
6302
did ( state, d) ;
6307
- region ( state, * r) ;
6308
6303
}
6309
6304
ty_projection( ref data) => {
6310
6305
byte ! ( 23 ) ;
@@ -6618,8 +6613,7 @@ pub fn accumulate_lifetimes_in_type(accumulator: &mut Vec<ty::Region>,
6618
6613
ty_struct( _, substs) => {
6619
6614
accum_substs ( accumulator, substs) ;
6620
6615
}
6621
- ty_closure( _, region, substs) => {
6622
- accumulator. push ( * region) ;
6616
+ ty_closure( _, substs) => {
6623
6617
accum_substs ( accumulator, substs) ;
6624
6618
}
6625
6619
ty_bool |
0 commit comments