File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed 
compiler/rustc_mir_transform/src Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -596,8 +596,14 @@ fn save_as_intervals<'tcx>(
596596            // as behaving so by default. 
597597            // We make an exception for simple assignments `_a.stuff = {copy|move} _b.stuff`, 
598598            // as marking `_b` live here would prevent unification. 
599-             let  is_simple_assignment =
600-                 matches ! ( stmt. kind,  StatementKind :: Assign ( box ( _,  Rvalue :: Use ( _) ) ) ) ; 
599+             let  is_simple_assignment = match  stmt. kind  { 
600+                 StatementKind :: Assign ( box ( 
601+                     lhs, 
602+                     Rvalue :: CopyForDeref ( rhs) 
603+                     | Rvalue :: Use ( Operand :: Copy ( rhs)  | Operand :: Move ( rhs) ) , 
604+                 ) )  => lhs. projection  == rhs. projection , 
605+                 _ => false , 
606+             } ; 
601607            VisitPlacesWith ( |place :  Place < ' tcx > ,  ctxt| { 
602608                if  let  Some ( relevant)  = relevant. shrink [ place. local ]  { 
603609                    match  DefUse :: for_place ( place,  ctxt)  { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments