diff --git a/src/librustc_mir/borrow_check/nll/region_infer/mod.rs b/src/librustc_mir/borrow_check/nll/region_infer/mod.rs index 2fdb7d63cb5..0b777575df3 100644 --- a/src/librustc_mir/borrow_check/nll/region_infer/mod.rs +++ b/src/librustc_mir/borrow_check/nll/region_infer/mod.rs @@ -317,8 +317,11 @@ impl<'tcx> RegionInferenceContext<'tcx> { } // Add `end(X)` into the set for X. - self.liveness_constraints - .add_element(variable, variable, &Cause::UniversalRegion(variable)); + self.liveness_constraints.add_element( + variable, + variable, + &Cause::UniversalRegion(variable), + ); } } @@ -841,7 +844,9 @@ impl<'tcx> RegionInferenceContext<'tcx> { sup_region, sub_region, point ); - let inferred_values = self.inferred_values.as_ref().expect("values for regions not yet inferred"); + let inferred_values = self.inferred_values + .as_ref() + .expect("values for regions not yet inferred"); debug!( "eval_outlives: sup_region's value = {:?}", @@ -858,10 +863,11 @@ impl<'tcx> RegionInferenceContext<'tcx> { // now). Therefore, the sup-region outlives the sub-region if, // for each universal region R1 in the sub-region, there // exists some region R2 in the sup-region that outlives R1. - let universal_outlives = - inferred_values.universal_regions_outlived_by(sub_region) + let universal_outlives = inferred_values + .universal_regions_outlived_by(sub_region) .all(|r1| { - inferred_values.universal_regions_outlived_by(sup_region) + inferred_values + .universal_regions_outlived_by(sup_region) .any(|r2| self.universal_regions.outlives(r2, r1)) }); diff --git a/src/librustc_mir/borrow_check/nll/region_infer/values.rs b/src/librustc_mir/borrow_check/nll/region_infer/values.rs index 3e2d9d956e7..e914be52db0 100644 --- a/src/librustc_mir/borrow_check/nll/region_infer/values.rs +++ b/src/librustc_mir/borrow_check/nll/region_infer/values.rs @@ -9,12 +9,12 @@ // except according to those terms. use borrow_check::nll::region_infer::TrackCauses; +use rustc::mir::{BasicBlock, Location, Mir}; +use rustc::ty::RegionVid; use rustc_data_structures::bitvec::SparseBitMatrix; use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::indexed_vec::Idx; use rustc_data_structures::indexed_vec::IndexVec; -use rustc::mir::{BasicBlock, Location, Mir}; -use rustc::ty::RegionVid; use std::fmt::Debug; use std::rc::Rc; @@ -233,7 +233,12 @@ impl RegionValues { /// Adds the given element to the value for the given region. Returns true if /// the element is newly added (i.e., was not already present). - pub(super) fn add_element(&mut self, r: RegionVid, elem: E, cause: &Cause) -> bool { + pub(super) fn add_element( + &mut self, + r: RegionVid, + elem: E, + cause: &Cause, + ) -> bool { let i = self.elements.index(elem); self.add_internal(r, i, |_| cause.clone()) }