Skip to content

Commit 81f64b7

Browse files
nikomatsakiswesleywiser
authored andcommitted
universal_regions.rs: rustfmt
1 parent da12d02 commit 81f64b7

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

src/librustc_mir/borrow_check/nll/universal_regions.rs

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,9 @@ impl<'tcx> UniversalRegions<'tcx> {
241241
region_mapping.push(fr);
242242
});
243243

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+
});
246247

247248
assert_eq!(
248249
region_mapping.len(),
@@ -352,9 +353,8 @@ impl<'cx, 'gcx, 'tcx> UniversalRegionsBuilder<'cx, 'gcx, 'tcx> {
352353
// let c = || { let x: &'a u32 = ...; }
353354
// }
354355
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)
358358
}
359359

360360
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> {
371371
// Converse of above, if this is a function then the late-bound regions declared on its
372372
// signature are local to the fn.
373373
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);
377376
}
378377

379378
let fr_fn_body = self.infcx.next_nll_region_var(FR).to_region_vid();
@@ -582,11 +581,10 @@ trait InferCtxtExt<'tcx> {
582581
where
583582
T: TypeFoldable<'tcx>;
584583

585-
586584
fn replace_late_bound_regions_with_nll_infer_vars(
587585
&self,
588586
mir_def_id: DefId,
589-
indices: &mut UniversalRegionIndices<'tcx>
587+
indices: &mut UniversalRegionIndices<'tcx>,
590588
);
591589
}
592590

@@ -710,11 +708,14 @@ impl<'tcx> UniversalRegionIndices<'tcx> {
710708
fn for_each_late_bound_region_defined_on<'tcx>(
711709
tcx: TyCtxt<'_, '_, 'tcx>,
712710
fn_def_id: DefId,
713-
mut f: impl FnMut(ty::Region<'tcx>)
714-
) {
711+
mut f: impl FnMut(ty::Region<'tcx>),
712+
) {
715713
if let Some(late_bounds) = tcx.is_late_bound_map(fn_def_id.index) {
716714
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+
};
718719
let region_node_id = tcx.hir.hir_to_node_id(hir_id);
719720
let name = tcx.hir.name(region_node_id).as_interned_str();
720721
let region_def_id = tcx.hir.local_def_id(region_node_id);

0 commit comments

Comments
 (0)