@@ -168,7 +168,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
168168        let  scrutinee_place =
169169            unpack ! ( block = self . lower_scrutinee( block,  scrutinee,  scrutinee_span, ) ) ; 
170170
171-         let  mut  arm_candidates = self . create_match_candidates ( scrutinee_place. clone ( ) ,  & arms) ; 
171+         let  mut  arm_candidates = self . create_match_candidates ( & scrutinee_place,  & arms) ; 
172172
173173        let  match_has_guard = arm_candidates. iter ( ) . any ( |( _,  candidate) | candidate. has_guard ) ; 
174174        let  mut  candidates =
@@ -230,7 +230,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
230230    /// Create the initial `Candidate`s for a `match` expression. 
231231fn  create_match_candidates < ' pat > ( 
232232        & mut  self , 
233-         scrutinee :  PlaceBuilder < ' tcx > , 
233+         scrutinee :  & PlaceBuilder < ' tcx > , 
234234        arms :  & ' pat  [ ArmId ] , 
235235    )  -> Vec < ( & ' pat  Arm < ' tcx > ,  Candidate < ' pat ,  ' tcx > ) > 
236236    where 
@@ -1332,15 +1332,14 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
13321332                bug ! ( "Or-patterns should have been sorted to the end" ) ; 
13331333            } ; 
13341334            let  or_span = match_pair. pattern . span ; 
1335-             let  place = match_pair. place ; 
13361335
13371336            first_candidate. visit_leaves ( |leaf_candidate| { 
13381337                self . test_or_pattern ( 
13391338                    leaf_candidate, 
13401339                    & mut  otherwise, 
13411340                    pats, 
13421341                    or_span, 
1343-                     place . clone ( ) , 
1342+                     & match_pair . place , 
13441343                    fake_borrows, 
13451344                ) ; 
13461345            } ) ; 
@@ -1368,7 +1367,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
13681367        otherwise :  & mut  Option < BasicBlock > , 
13691368        pats :  & ' pat  [ Box < Pat < ' tcx > > ] , 
13701369        or_span :  Span , 
1371-         place :  PlaceBuilder < ' tcx > , 
1370+         place :  & PlaceBuilder < ' tcx > , 
13721371        fake_borrows :  & mut  Option < FxIndexSet < Place < ' tcx > > > , 
13731372    )  { 
13741373        debug ! ( "candidate={:#?}\n pats={:#?}" ,  candidate,  pats) ; 
@@ -1607,7 +1606,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
16071606        // encounter a candidate where the test is not relevant; at 
16081607        // that point, we stop sorting. 
16091608        while  let  Some ( candidate)  = candidates. first_mut ( )  { 
1610-             let  Some ( idx)  = self . sort_candidate ( & match_place. clone ( ) ,  & test,  candidate)  else  { 
1609+             let  Some ( idx)  = self . sort_candidate ( & match_place,  & test,  candidate)  else  { 
16111610                break ; 
16121611            } ; 
16131612            let  ( candidate,  rest)  = candidates. split_first_mut ( ) . unwrap ( ) ; 
@@ -1676,7 +1675,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
16761675            target_blocks
16771676        } ; 
16781677
1679-         self . perform_test ( span,  scrutinee_span,  block,  match_place,  & test,  make_target_blocks) ; 
1678+         self . perform_test ( span,  scrutinee_span,  block,  & match_place,  & test,  make_target_blocks) ; 
16801679    } 
16811680
16821681    /// Determine the fake borrows that are needed from a set of places that 
0 commit comments