diff --git a/src/librustc/infer/canonical/mod.rs b/src/librustc/infer/canonical/mod.rs index 4693cf7181e..308abb5e133 100644 --- a/src/librustc/infer/canonical/mod.rs +++ b/src/librustc/infer/canonical/mod.rs @@ -307,7 +307,8 @@ impl<'tcx, V> Canonical<'tcx, V> { } } -pub type QueryOutlivesConstraint<'tcx> = ty::Binder, Region<'tcx>>>; +pub type QueryOutlivesConstraint<'tcx> = + ty::Binder, Region<'tcx>>>; impl<'cx, 'tcx> InferCtxt<'cx, 'tcx> { /// Creates a substitution S for the canonical value with fresh diff --git a/src/librustc/infer/region_constraints/mod.rs b/src/librustc/infer/region_constraints/mod.rs index a56c71b2b1f..6ec093ee026 100644 --- a/src/librustc/infer/region_constraints/mod.rs +++ b/src/librustc/infer/region_constraints/mod.rs @@ -973,6 +973,9 @@ impl<'tcx> RegionConstraintData<'tcx> { verifys, givens, } = self; - constraints.is_empty() && pick_constraints.is_empty() && verifys.is_empty() && givens.is_empty() + constraints.is_empty() && + pick_constraints.is_empty() && + verifys.is_empty() && + givens.is_empty() } } diff --git a/src/librustc_data_structures/graph/vec_graph/mod.rs b/src/librustc_data_structures/graph/vec_graph/mod.rs index 6b3349e3e15..7078a5a9c9b 100644 --- a/src/librustc_data_structures/graph/vec_graph/mod.rs +++ b/src/librustc_data_structures/graph/vec_graph/mod.rs @@ -110,4 +110,3 @@ impl WithSuccessors for VecGraph { self.successors(node).iter().cloned() } } - 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 1e377f94fae..c86ce995238 100644 --- a/src/librustc_mir/borrow_check/nll/region_infer/mod.rs +++ b/src/librustc_mir/borrow_check/nll/region_infer/mod.rs @@ -1493,19 +1493,25 @@ impl<'tcx> RegionInferenceContext<'tcx> { debug!("check_pick_constraint(p_c_i={:?})", p_c_i); let p_c = &pick_constraints[p_c_i]; let pick_region_vid = p_c.pick_region_vid; - debug!("check_pick_constraint: pick_region_vid={:?} with value {}", pick_region_vid, self.region_value_str(pick_region_vid)); + debug!( + "check_pick_constraint: pick_region_vid={:?} with value {}", + pick_region_vid, + self.region_value_str(pick_region_vid), + ); let option_regions = pick_constraints.option_regions(p_c_i); debug!("check_pick_constraint: option_regions={:?}", option_regions); // did the pick-region wind up equal to any of the option regions? - if let Some(o) = option_regions.iter().find(|&&o_r| self.eval_equal(o_r, p_c.pick_region_vid)) { + if let Some(o) = option_regions.iter().find(|&&o_r| { + self.eval_equal(o_r, p_c.pick_region_vid) + }) { debug!("check_pick_constraint: evaluated as equal to {:?}", o); continue; } // if not, report an error let region_scope_tree = &infcx.tcx.region_scope_tree(mir_def_id); - let pick_region = infcx.tcx.mk_region(ty::ReVar(pick_region_vid)); // XXX + let pick_region = infcx.tcx.mk_region(ty::ReVar(pick_region_vid)); opaque_types::unexpected_hidden_region_diagnostic( infcx.tcx, Some(region_scope_tree),