@@ -63,7 +63,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
6363 break_scope,
6464 variable_source_info,
6565 declare_bindings,
66- match cold_branch { Some ( false ) => Some ( false ) , _ => None } ,
66+ match cold_branch {
67+ Some ( false ) => Some ( false ) ,
68+ _ => None ,
69+ } ,
6770 ) ) ;
6871
6972 let rhs_then_block = unpack ! ( this. then_else_break(
@@ -89,7 +92,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
8992 local_scope,
9093 variable_source_info,
9194 true ,
92- match cold_branch { Some ( true ) => Some ( true ) , _ => None } ,
95+ match cold_branch {
96+ Some ( true ) => Some ( true ) ,
97+ _ => None ,
98+ } ,
9399 )
94100 } ) ;
95101 let rhs_success_block = unpack ! ( this. then_else_break(
@@ -167,12 +173,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
167173
168174 let then_block = this. cfg . start_new_block ( ) ;
169175 let else_block = this. cfg . start_new_block ( ) ;
170- let term = TerminatorKind :: if_with_cold_br (
171- operand,
172- then_block,
173- else_block,
174- cold_branch
175- ) ;
176+ let term =
177+ TerminatorKind :: if_with_cold_br ( operand, then_block, else_block, cold_branch) ;
176178
177179 let source_info = this. source_info ( expr_span) ;
178180 this. cfg . terminate ( block, source_info, term) ;
@@ -307,8 +309,13 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
307309 let arm = & self . thir [ arm] ;
308310 let arm_has_guard = arm. guard . is_some ( ) ;
309311 let arm_is_cold = arm. is_cold ;
310- let arm_candidate =
311- Candidate :: new ( scrutinee. clone ( ) , & arm. pattern , arm_has_guard, arm_is_cold, self ) ;
312+ let arm_candidate = Candidate :: new (
313+ scrutinee. clone ( ) ,
314+ & arm. pattern ,
315+ arm_has_guard,
316+ arm_is_cold,
317+ self ,
318+ ) ;
312319 ( arm, arm_candidate)
313320 } )
314321 . collect ( )
@@ -667,7 +674,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
667674 initializer : PlaceBuilder < ' tcx > ,
668675 set_match_place : bool ,
669676 ) -> BlockAnd < ( ) > {
670- let mut candidate = Candidate :: new ( initializer. clone ( ) , irrefutable_pat, false , false , self ) ;
677+ let mut candidate =
678+ Candidate :: new ( initializer. clone ( ) , irrefutable_pat, false , false , self ) ;
671679 let fake_borrow_temps = self . lower_match_tree (
672680 block,
673681 irrefutable_pat. span ,
@@ -1520,7 +1528,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
15201528 debug ! ( "candidate={:#?}\n pats={:#?}" , candidate, pats) ;
15211529 let mut or_candidates: Vec < _ > = pats
15221530 . iter ( )
1523- . map ( |pat| Candidate :: new ( place. clone ( ) , pat, candidate. has_guard , candidate. is_cold , self ) )
1531+ . map ( |pat| {
1532+ Candidate :: new ( place. clone ( ) , pat, candidate. has_guard , candidate. is_cold , self )
1533+ } )
15241534 . collect ( ) ;
15251535 let mut or_candidate_refs: Vec < _ > = or_candidates. iter_mut ( ) . collect ( ) ;
15261536 let otherwise = if candidate. otherwise_block . is_some ( ) {
@@ -1771,10 +1781,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
17711781 // Find cold targets.
17721782 let mut cold_targets: ThinVec < usize > = ThinVec :: new ( ) ;
17731783
1774- let is_otherwise_target_cold =
1775- candidates. len ( ) > 0 &&
1776- candidates. iter ( ) . all ( |c| c. is_cold ) ; // && c.match_pairs.is_empty());
1777- if is_otherwise_target_cold {
1784+ let is_otherwise_target_cold = candidates. len ( ) > 0 && candidates. iter ( ) . all ( |c| c. is_cold ) ;
1785+ if is_otherwise_target_cold {
17781786 cold_targets. push ( target_candidates. len ( ) ) ;
17791787 }
17801788
@@ -1849,7 +1857,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
18491857 & match_place,
18501858 & test,
18511859 target_blocks,
1852- cold_targets
1860+ cold_targets,
18531861 ) ;
18541862 }
18551863
@@ -1948,7 +1956,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
19481956 let expr_span = self . thir [ expr_id] . span ;
19491957 let expr_place_builder = unpack ! ( block = self . lower_scrutinee( block, expr_id, expr_span) ) ;
19501958 let wildcard = Pat :: wildcard_from_ty ( pat. ty ) ;
1951- let mut guard_candidate = Candidate :: new ( expr_place_builder. clone ( ) , pat, false , false , self ) ;
1959+ let mut guard_candidate =
1960+ Candidate :: new ( expr_place_builder. clone ( ) , pat, false , false , self ) ;
19521961 let mut otherwise_candidate =
19531962 Candidate :: new ( expr_place_builder. clone ( ) , & wildcard, false , false , self ) ;
19541963 let fake_borrow_temps = self . lower_match_tree (
0 commit comments