Skip to content

Commit ce8e837

Browse files
committed
Fix tidy errors
1 parent a164ae0 commit ce8e837

File tree

3 files changed

+27
-14
lines changed

3 files changed

+27
-14
lines changed

src/librustc_mir/borrow_check/mod.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,15 @@ fn do_mir_borrowck<'a, 'gcx, 'tcx>(infcx: &InferCtxt<'a, 'gcx, 'tcx>,
127127
let opt_regioncx = if !tcx.sess.opts.debugging_opts.nll {
128128
None
129129
} else {
130-
Some(nll::compute_regions(infcx,
131-
src,
132-
&free_regions,
133-
mir,
134-
param_env,
135-
&flow_inits,
136-
&mdpe.move_data))
130+
Some(nll::compute_regions(
131+
infcx,
132+
src,
133+
&free_regions,
134+
mir,
135+
param_env,
136+
&flow_inits,
137+
&mdpe.move_data
138+
))
137139
};
138140

139141
let mut mbcx = MirBorrowckCtxt {

src/librustc_mir/borrow_check/nll/constraint_generation.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,22 @@ impl<'a, 'cx, 'gcx, 'tcx> ConstraintGeneration<'a, 'cx, 'gcx, 'tcx> {
8383
}
8484
});
8585

86-
self.liveness
87-
.drop
88-
.simulate_block(self.mir, bb, |location, live_locals| {
86+
self.liveness.drop.simulate_block(
87+
self.mir,
88+
bb,
89+
|location, live_locals| {
8990
for live_local in live_locals.iter() {
90-
if let LookupResult::Exact(mpi) = self.move_data.rev_lookup.find(&Lvalue::Local(live_local)) {
91+
if let LookupResult::Exact(mpi) =
92+
self.move_data.rev_lookup.find(&Lvalue::Local(live_local))
93+
{
9194
if self.flow_inits.has_any_child_of(mpi).is_some() {
9295
let live_local_ty = self.mir.local_decls[live_local].ty;
9396
self.add_drop_live_constraint(live_local_ty, location);
9497
}
9598
}
9699
}
97-
});
100+
},
101+
);
98102
}
99103
}
100104

src/librustc_mir/borrow_check/nll/mod.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,15 @@ pub(super) fn compute_regions<'a, 'gcx, 'tcx>(
9393
};
9494

9595
// Generate non-subtyping constraints.
96-
constraint_generation::generate_constraints(infcx, &mut regioncx, &mir, source, liveness,
97-
flow_inits, move_data);
96+
constraint_generation::generate_constraints(
97+
infcx,
98+
&mut regioncx,
99+
&mir,
100+
source,
101+
liveness,
102+
flow_inits,
103+
move_data
104+
);
98105

99106
// Solve the region constraints.
100107
regioncx.solve(infcx, &mir);

0 commit comments

Comments
 (0)