@@ -269,9 +269,9 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
269
269
snapshot : & CombinedSnapshot ,
270
270
debruijn : ty:: DebruijnIndex ,
271
271
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 > {
275
275
// Regions that pre-dated the LUB computation stay as they are.
276
276
if !is_var_in_set ( new_vars, r0) {
277
277
assert ! ( !r0. is_bound( ) ) ;
@@ -284,7 +284,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
284
284
// Variables created during LUB computation which are
285
285
// *related* to regions that pre-date the LUB computation
286
286
// 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) ) {
288
288
debug ! ( "generalize_region(r0={:?}): \
289
289
non-new-variables found in {:?}",
290
290
r0, tainted) ;
@@ -365,11 +365,11 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
365
365
snapshot : & CombinedSnapshot ,
366
366
debruijn : ty:: DebruijnIndex ,
367
367
new_vars : & [ ty:: RegionVid ] ,
368
- a_map : & FxHashMap < ty:: BoundRegion , & ' tcx ty:: Region > ,
368
+ a_map : & FxHashMap < ty:: BoundRegion , ty:: Region < ' tcx > > ,
369
369
a_vars : & [ ty:: RegionVid ] ,
370
370
b_vars : & [ ty:: RegionVid ] ,
371
- r0 : & ' tcx ty:: Region )
372
- -> & ' tcx ty:: Region {
371
+ r0 : ty:: Region < ' tcx > )
372
+ -> ty:: Region < ' tcx > {
373
373
if !is_var_in_set ( new_vars, r0) {
374
374
assert ! ( !r0. is_bound( ) ) ;
375
375
return r0;
@@ -434,8 +434,8 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
434
434
435
435
fn rev_lookup < ' a , ' gcx , ' tcx > ( infcx : & InferCtxt < ' a , ' gcx , ' tcx > ,
436
436
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 >
439
439
{
440
440
for ( a_br, a_r) in a_map {
441
441
if * a_r == r {
@@ -450,14 +450,14 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
450
450
451
451
fn fresh_bound_variable < ' a , ' gcx , ' tcx > ( infcx : & InferCtxt < ' a , ' gcx , ' tcx > ,
452
452
debruijn : ty:: DebruijnIndex )
453
- -> & ' tcx ty:: Region {
453
+ -> ty:: Region < ' tcx > {
454
454
infcx. region_vars . new_bound ( debruijn)
455
455
}
456
456
}
457
457
}
458
458
459
459
fn 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 > > )
461
461
-> Vec < ty:: RegionVid > {
462
462
map. iter ( )
463
463
. map ( |( _, & r) | match * r {
@@ -472,7 +472,7 @@ fn var_ids<'a, 'gcx, 'tcx>(fields: &CombineFields<'a, 'gcx, 'tcx>,
472
472
. collect ( )
473
473
}
474
474
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 {
476
476
match * r {
477
477
ty:: ReVar ( ref v) => new_vars. iter ( ) . any ( |x| x == v) ,
478
478
_ => false
@@ -484,7 +484,7 @@ fn fold_regions_in<'a, 'gcx, 'tcx, T, F>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
484
484
mut fldr : F )
485
485
-> T
486
486
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 > ,
488
488
{
489
489
tcx. fold_regions ( unbound_value, & mut false , |region, current_depth| {
490
490
// 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>,
502
502
impl < ' a , ' gcx , ' tcx > InferCtxt < ' a , ' gcx , ' tcx > {
503
503
fn tainted_regions ( & self ,
504
504
snapshot : & CombinedSnapshot ,
505
- r : & ' tcx ty:: Region ,
505
+ r : ty:: Region < ' tcx > ,
506
506
directions : TaintDirections )
507
- -> FxHashSet < & ' tcx ty:: Region > {
507
+ -> FxHashSet < ty:: Region < ' tcx > > {
508
508
self . region_vars . tainted ( & snapshot. region_vars_snapshot , r, directions)
509
509
}
510
510
@@ -731,7 +731,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
731
731
// region back to the `ty::BoundRegion` that it originally
732
732
// represented. Because `leak_check` passed, we know that
733
733
// 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 > =
735
735
skol_map
736
736
. iter ( )
737
737
. flat_map ( |( & skol_br, & skol) | {
0 commit comments