@@ -241,8 +241,9 @@ impl<'tcx> UniversalRegions<'tcx> {
241
241
region_mapping. push ( fr) ;
242
242
} ) ;
243
243
244
- for_each_late_bound_region_defined_on (
245
- tcx, closure_base_def_id, |r| { region_mapping. push ( r) ; } ) ;
244
+ for_each_late_bound_region_defined_on ( tcx, closure_base_def_id, |r| {
245
+ region_mapping. push ( r) ;
246
+ } ) ;
246
247
247
248
assert_eq ! (
248
249
region_mapping. len( ) ,
@@ -352,9 +353,8 @@ impl<'cx, 'gcx, 'tcx> UniversalRegionsBuilder<'cx, 'gcx, 'tcx> {
352
353
// let c = || { let x: &'a u32 = ...; }
353
354
// }
354
355
if self . mir_def_id != closure_base_def_id {
355
- self . infcx . replace_late_bound_regions_with_nll_infer_vars (
356
- self . mir_def_id ,
357
- & mut indices)
356
+ self . infcx
357
+ . replace_late_bound_regions_with_nll_infer_vars ( self . mir_def_id , & mut indices)
358
358
}
359
359
360
360
let bound_inputs_and_output = self . compute_inputs_and_output ( & indices, defining_ty) ;
@@ -371,9 +371,8 @@ impl<'cx, 'gcx, 'tcx> UniversalRegionsBuilder<'cx, 'gcx, 'tcx> {
371
371
// Converse of above, if this is a function then the late-bound regions declared on its
372
372
// signature are local to the fn.
373
373
if self . mir_def_id == closure_base_def_id {
374
- self . infcx . replace_late_bound_regions_with_nll_infer_vars (
375
- self . mir_def_id ,
376
- & mut indices) ;
374
+ self . infcx
375
+ . replace_late_bound_regions_with_nll_infer_vars ( self . mir_def_id , & mut indices) ;
377
376
}
378
377
379
378
let fr_fn_body = self . infcx . next_nll_region_var ( FR ) . to_region_vid ( ) ;
@@ -582,11 +581,10 @@ trait InferCtxtExt<'tcx> {
582
581
where
583
582
T : TypeFoldable < ' tcx > ;
584
583
585
-
586
584
fn replace_late_bound_regions_with_nll_infer_vars (
587
585
& self ,
588
586
mir_def_id : DefId ,
589
- indices : & mut UniversalRegionIndices < ' tcx >
587
+ indices : & mut UniversalRegionIndices < ' tcx > ,
590
588
) ;
591
589
}
592
590
@@ -710,11 +708,14 @@ impl<'tcx> UniversalRegionIndices<'tcx> {
710
708
fn for_each_late_bound_region_defined_on < ' tcx > (
711
709
tcx : TyCtxt < ' _ , ' _ , ' tcx > ,
712
710
fn_def_id : DefId ,
713
- mut f : impl FnMut ( ty:: Region < ' tcx > )
714
- ) {
711
+ mut f : impl FnMut ( ty:: Region < ' tcx > ) ,
712
+ ) {
715
713
if let Some ( late_bounds) = tcx. is_late_bound_map ( fn_def_id. index ) {
716
714
for late_bound in late_bounds. iter ( ) {
717
- let hir_id = HirId { owner : fn_def_id. index , local_id : * late_bound } ;
715
+ let hir_id = HirId {
716
+ owner : fn_def_id. index ,
717
+ local_id : * late_bound,
718
+ } ;
718
719
let region_node_id = tcx. hir . hir_to_node_id ( hir_id) ;
719
720
let name = tcx. hir . name ( region_node_id) . as_interned_str ( ) ;
720
721
let region_def_id = tcx. hir . local_def_id ( region_node_id) ;
0 commit comments