From ca8176d778cb1b89bf015b032872b6832be0cf8c Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Thu, 29 Mar 2018 11:28:36 -0400 Subject: [PATCH] apply pnkfelix nits --- .../borrow_check/nll/region_infer/mod.rs | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) 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 a545a3716c90..08391401cc69 100644 --- a/src/librustc_mir/borrow_check/nll/region_infer/mod.rs +++ b/src/librustc_mir/borrow_check/nll/region_infer/mod.rs @@ -149,7 +149,7 @@ pub struct Constraint { point: Location, /// Later on, we thread the constraints onto a linked list - /// sorted by their `sub` field. So if you had: + /// grouped by their `sub` field. So if you had: /// /// Index | Constraint | Next Field /// ----- | ---------- | ---------- @@ -423,9 +423,11 @@ impl<'tcx> RegionInferenceContext<'tcx> { mir: &Mir<'tcx>, mir_def_id: DefId, ) -> Option> { - common::time(infcx.tcx.sess, &format!("solve({:?})", mir_def_id), || { - self.solve_inner(infcx, mir, mir_def_id) - }) + common::time( + infcx.tcx.sess, + &format!("solve_nll_region_constraints({:?})", mir_def_id), + || self.solve_inner(infcx, mir, mir_def_id), + ) } fn solve_inner<'gcx>( @@ -451,7 +453,13 @@ impl<'tcx> RegionInferenceContext<'tcx> { None }; - self.check_type_tests(infcx, mir, dfs_storage, mir_def_id, outlives_requirements.as_mut()); + self.check_type_tests( + infcx, + mir, + dfs_storage, + mir_def_id, + outlives_requirements.as_mut(), + ); self.check_universal_regions(infcx, mir_def_id, outlives_requirements.as_mut()); @@ -587,7 +595,13 @@ impl<'tcx> RegionInferenceContext<'tcx> { for type_test in &self.type_tests { debug!("check_type_test: {:?}", type_test); - if self.eval_region_test(mir, dfs_storage, type_test.point, type_test.lower_bound, &type_test.test) { + if self.eval_region_test( + mir, + dfs_storage, + type_test.point, + type_test.lower_bound, + &type_test.test, + ) { continue; }