@@ -269,9 +269,9 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
269269 snapshot : & CombinedSnapshot ,
270270 debruijn : ty:: DebruijnIndex ,
271271 new_vars : & [ ty:: RegionVid ] ,
272- a_map : & FxHashMap < ty:: BoundRegion , & ' tcx ty:: Region > ,
273- r0 : & ' tcx ty:: Region )
274- -> & ' tcx ty:: Region {
272+ a_map : & FxHashMap < ty:: BoundRegion , ty:: Region < ' tcx > > ,
273+ r0 : ty:: Region < ' tcx > )
274+ -> ty:: Region < ' tcx > {
275275 // Regions that pre-dated the LUB computation stay as they are.
276276 if !is_var_in_set ( new_vars, r0) {
277277 assert ! ( !r0. is_bound( ) ) ;
@@ -284,7 +284,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
284284 // Variables created during LUB computation which are
285285 // *related* to regions that pre-date the LUB computation
286286 // stay as they are.
287- if !tainted. iter ( ) . all ( |r| is_var_in_set ( new_vars, * r) ) {
287+ if !tainted. iter ( ) . all ( |& r| is_var_in_set ( new_vars, r) ) {
288288 debug ! ( "generalize_region(r0={:?}): \
289289 non-new-variables found in {:?}",
290290 r0, tainted) ;
@@ -365,11 +365,11 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
365365 snapshot : & CombinedSnapshot ,
366366 debruijn : ty:: DebruijnIndex ,
367367 new_vars : & [ ty:: RegionVid ] ,
368- a_map : & FxHashMap < ty:: BoundRegion , & ' tcx ty:: Region > ,
368+ a_map : & FxHashMap < ty:: BoundRegion , ty:: Region < ' tcx > > ,
369369 a_vars : & [ ty:: RegionVid ] ,
370370 b_vars : & [ ty:: RegionVid ] ,
371- r0 : & ' tcx ty:: Region )
372- -> & ' tcx ty:: Region {
371+ r0 : ty:: Region < ' tcx > )
372+ -> ty:: Region < ' tcx > {
373373 if !is_var_in_set ( new_vars, r0) {
374374 assert ! ( !r0. is_bound( ) ) ;
375375 return r0;
@@ -434,8 +434,8 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
434434
435435 fn rev_lookup < ' a , ' gcx , ' tcx > ( infcx : & InferCtxt < ' a , ' gcx , ' tcx > ,
436436 span : Span ,
437- a_map : & FxHashMap < ty:: BoundRegion , & ' tcx ty:: Region > ,
438- r : & ' tcx ty:: Region ) -> & ' tcx ty:: Region
437+ a_map : & FxHashMap < ty:: BoundRegion , ty:: Region < ' tcx > > ,
438+ r : ty:: Region < ' tcx > ) -> ty:: Region < ' tcx >
439439 {
440440 for ( a_br, a_r) in a_map {
441441 if * a_r == r {
@@ -450,14 +450,14 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
450450
451451 fn fresh_bound_variable < ' a , ' gcx , ' tcx > ( infcx : & InferCtxt < ' a , ' gcx , ' tcx > ,
452452 debruijn : ty:: DebruijnIndex )
453- -> & ' tcx ty:: Region {
453+ -> ty:: Region < ' tcx > {
454454 infcx. region_vars . new_bound ( debruijn)
455455 }
456456 }
457457}
458458
459459fn var_ids < ' a , ' gcx , ' tcx > ( fields : & CombineFields < ' a , ' gcx , ' tcx > ,
460- map : & FxHashMap < ty:: BoundRegion , & ' tcx ty:: Region > )
460+ map : & FxHashMap < ty:: BoundRegion , ty:: Region < ' tcx > > )
461461 -> Vec < ty:: RegionVid > {
462462 map. iter ( )
463463 . map ( |( _, & r) | match * r {
@@ -472,7 +472,7 @@ fn var_ids<'a, 'gcx, 'tcx>(fields: &CombineFields<'a, 'gcx, 'tcx>,
472472 . collect ( )
473473}
474474
475- fn is_var_in_set ( new_vars : & [ ty:: RegionVid ] , r : & ty:: Region ) -> bool {
475+ fn is_var_in_set ( new_vars : & [ ty:: RegionVid ] , r : ty:: Region ) -> bool {
476476 match * r {
477477 ty:: ReVar ( ref v) => new_vars. iter ( ) . any ( |x| x == v) ,
478478 _ => false
@@ -484,7 +484,7 @@ fn fold_regions_in<'a, 'gcx, 'tcx, T, F>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
484484 mut fldr : F )
485485 -> T
486486 where T : TypeFoldable < ' tcx > ,
487- F : FnMut ( & ' tcx ty:: Region , ty:: DebruijnIndex ) -> & ' tcx ty:: Region ,
487+ F : FnMut ( ty:: Region < ' tcx > , ty:: DebruijnIndex ) -> ty:: Region < ' tcx > ,
488488{
489489 tcx. fold_regions ( unbound_value, & mut false , |region, current_depth| {
490490 // we should only be encountering "escaping" late-bound regions here,
@@ -502,9 +502,9 @@ fn fold_regions_in<'a, 'gcx, 'tcx, T, F>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
502502impl < ' a , ' gcx , ' tcx > InferCtxt < ' a , ' gcx , ' tcx > {
503503 fn tainted_regions ( & self ,
504504 snapshot : & CombinedSnapshot ,
505- r : & ' tcx ty:: Region ,
505+ r : ty:: Region < ' tcx > ,
506506 directions : TaintDirections )
507- -> FxHashSet < & ' tcx ty:: Region > {
507+ -> FxHashSet < ty:: Region < ' tcx > > {
508508 self . region_vars . tainted ( & snapshot. region_vars_snapshot , r, directions)
509509 }
510510
@@ -731,7 +731,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
731731 // region back to the `ty::BoundRegion` that it originally
732732 // represented. Because `leak_check` passed, we know that
733733 // these taint sets are mutually disjoint.
734- let inv_skol_map: FxHashMap < & ' tcx ty:: Region , ty:: BoundRegion > =
734+ let inv_skol_map: FxHashMap < ty:: Region < ' tcx > , ty:: BoundRegion > =
735735 skol_map
736736 . iter ( )
737737 . flat_map ( |( & skol_br, & skol) | {
0 commit comments