Skip to content

Commit c990309

Browse files
committed
rustfmt to pacify the mercilous tidy
1 parent 434d59a commit c990309

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

src/librustc_mir/borrow_check/nll/region_infer/mod.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,11 @@ impl<'tcx> RegionInferenceContext<'tcx> {
317317
}
318318

319319
// Add `end(X)` into the set for X.
320-
self.liveness_constraints
321-
.add_element(variable, variable, &Cause::UniversalRegion(variable));
320+
self.liveness_constraints.add_element(
321+
variable,
322+
variable,
323+
&Cause::UniversalRegion(variable),
324+
);
322325
}
323326
}
324327

@@ -841,7 +844,9 @@ impl<'tcx> RegionInferenceContext<'tcx> {
841844
sup_region, sub_region, point
842845
);
843846

844-
let inferred_values = self.inferred_values.as_ref().expect("values for regions not yet inferred");
847+
let inferred_values = self.inferred_values
848+
.as_ref()
849+
.expect("values for regions not yet inferred");
845850

846851
debug!(
847852
"eval_outlives: sup_region's value = {:?}",
@@ -858,10 +863,11 @@ impl<'tcx> RegionInferenceContext<'tcx> {
858863
// now). Therefore, the sup-region outlives the sub-region if,
859864
// for each universal region R1 in the sub-region, there
860865
// exists some region R2 in the sup-region that outlives R1.
861-
let universal_outlives =
862-
inferred_values.universal_regions_outlived_by(sub_region)
866+
let universal_outlives = inferred_values
867+
.universal_regions_outlived_by(sub_region)
863868
.all(|r1| {
864-
inferred_values.universal_regions_outlived_by(sup_region)
869+
inferred_values
870+
.universal_regions_outlived_by(sup_region)
865871
.any(|r2| self.universal_regions.outlives(r2, r1))
866872
});
867873

src/librustc_mir/borrow_check/nll/region_infer/values.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
// except according to those terms.
1010

1111
use borrow_check::nll::region_infer::TrackCauses;
12+
use rustc::mir::{BasicBlock, Location, Mir};
13+
use rustc::ty::RegionVid;
1214
use rustc_data_structures::bitvec::SparseBitMatrix;
1315
use rustc_data_structures::fx::FxHashMap;
1416
use rustc_data_structures::indexed_vec::Idx;
1517
use rustc_data_structures::indexed_vec::IndexVec;
16-
use rustc::mir::{BasicBlock, Location, Mir};
17-
use rustc::ty::RegionVid;
1818
use std::fmt::Debug;
1919
use std::rc::Rc;
2020

@@ -233,7 +233,12 @@ impl RegionValues {
233233

234234
/// Adds the given element to the value for the given region. Returns true if
235235
/// the element is newly added (i.e., was not already present).
236-
pub(super) fn add_element<E: ToElementIndex>(&mut self, r: RegionVid, elem: E, cause: &Cause) -> bool {
236+
pub(super) fn add_element<E: ToElementIndex>(
237+
&mut self,
238+
r: RegionVid,
239+
elem: E,
240+
cause: &Cause,
241+
) -> bool {
237242
let i = self.elements.index(elem);
238243
self.add_internal(r, i, |_| cause.clone())
239244
}

0 commit comments

Comments
 (0)