@@ -19,7 +19,7 @@ use rustc::infer::NLLRegionVariableOrigin;
1919use rustc:: infer:: RegionVariableOrigin ;
2020use rustc:: mir:: {
2121 ClosureOutlivesRequirement , ClosureOutlivesSubject , ClosureRegionRequirements , Local , Location ,
22- Mir
22+ Mir ,
2323} ;
2424use rustc:: ty:: { self , RegionVid , Ty , TyCtxt , TypeFoldable } ;
2525use rustc:: util:: common;
@@ -271,17 +271,11 @@ impl<'tcx> RegionInferenceContext<'tcx> {
271271
272272 // Add all nodes in the CFG to liveness constraints
273273 for point_index in self . elements . all_point_indices ( ) {
274- self . liveness_constraints . add_element (
275- variable,
276- point_index,
277- ) ;
274+ self . liveness_constraints . add_element ( variable, point_index) ;
278275 }
279276
280277 // Add `end(X)` into the set for X.
281- self . liveness_constraints . add_element (
282- variable,
283- variable,
284- ) ;
278+ self . liveness_constraints . add_element ( variable, variable) ;
285279 }
286280 }
287281
@@ -335,12 +329,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
335329 }
336330
337331 /// Indicates that the region variable `sup` must outlive `sub` is live at the point `point`.
338- pub ( super ) fn add_outlives (
339- & mut self ,
340- locations : Locations ,
341- sup : RegionVid ,
342- sub : RegionVid ,
343- ) {
332+ pub ( super ) fn add_outlives ( & mut self , locations : Locations , sup : RegionVid , sub : RegionVid ) {
344333 assert ! ( self . inferred_values. is_none( ) , "values already inferred" ) ;
345334 self . constraints . push ( OutlivesConstraint {
346335 locations,
@@ -445,11 +434,14 @@ impl<'tcx> RegionInferenceContext<'tcx> {
445434 debug ! ( "propagate_constraints: sub={:?}" , constraint. sub) ;
446435 debug ! ( "propagate_constraints: sup={:?}" , constraint. sup) ;
447436
448- self . constraints . each_affected_by_dirty ( dependency_map[ constraint. sup ] , |dep_idx| {
449- if clean_bit_vec. remove ( dep_idx. index ( ) ) {
450- dirty_list. push ( dep_idx) ;
451- }
452- } ) ;
437+ self . constraints . each_affected_by_dirty (
438+ dependency_map[ constraint. sup ] ,
439+ |dep_idx| {
440+ if clean_bit_vec. remove ( dep_idx. index ( ) ) {
441+ dirty_list. push ( dep_idx) ;
442+ }
443+ } ,
444+ ) ;
453445 }
454446
455447 debug ! ( "\n " ) ;
@@ -487,8 +479,12 @@ impl<'tcx> RegionInferenceContext<'tcx> {
487479 }
488480
489481 if let Some ( propagated_outlives_requirements) = & mut propagated_outlives_requirements {
490- if self . try_promote_type_test ( infcx, mir, type_test,
491- propagated_outlives_requirements) {
482+ if self . try_promote_type_test (
483+ infcx,
484+ mir,
485+ type_test,
486+ propagated_outlives_requirements,
487+ ) {
492488 continue ;
493489 }
494490 }
@@ -744,12 +740,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
744740
745741 /// Test if `test` is true when applied to `lower_bound` at
746742 /// `point`, and returns true or false.
747- fn eval_region_test (
748- & self ,
749- mir : & Mir < ' tcx > ,
750- lower_bound : RegionVid ,
751- test : & RegionTest ,
752- ) -> bool {
743+ fn eval_region_test ( & self , mir : & Mir < ' tcx > , lower_bound : RegionVid , test : & RegionTest ) -> bool {
753744 debug ! (
754745 "eval_region_test(lower_bound={:?}, test={:?})" ,
755746 lower_bound, test
@@ -781,10 +772,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
781772 sup_region : RegionVid ,
782773 sub_region : RegionVid ,
783774 ) -> bool {
784- debug ! (
785- "eval_outlives({:?}: {:?})" ,
786- sup_region, sub_region
787- ) ;
775+ debug ! ( "eval_outlives({:?}: {:?})" , sup_region, sub_region) ;
788776
789777 let inferred_values = self
790778 . inferred_values
0 commit comments