@@ -87,7 +87,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
8787 let is_min = this. temp ( bool_ty, expr_span) ;
8888
8989 this. cfg . push_assign ( block, source_info, & is_min,
90- Rvalue :: BinaryOp ( BinOp :: Eq , arg. clone ( ) , minval) ) ;
90+ Rvalue :: BinaryOp ( BinOp :: Eq , arg. to_copy ( ) , minval) ) ;
9191
9292 let err = ConstMathErr :: Overflow ( Op :: Neg ) ;
9393 block = this. assert ( block, Operand :: Move ( is_min) , false ,
@@ -346,7 +346,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
346346 let is_zero = self . temp ( bool_ty, span) ;
347347 let zero = self . zero_literal ( span, ty) ;
348348 self . cfg . push_assign ( block, source_info, & is_zero,
349- Rvalue :: BinaryOp ( BinOp :: Eq , rhs. clone ( ) , zero) ) ;
349+ Rvalue :: BinaryOp ( BinOp :: Eq , rhs. to_copy ( ) , zero) ) ;
350350
351351 block = self . assert ( block, Operand :: Move ( is_zero) , false ,
352352 AssertMessage :: Math ( zero_err) , span) ;
@@ -364,9 +364,9 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
364364 // this does (rhs == -1) & (lhs == MIN). It could short-circuit instead
365365
366366 self . cfg . push_assign ( block, source_info, & is_neg_1,
367- Rvalue :: BinaryOp ( BinOp :: Eq , rhs. clone ( ) , neg_1) ) ;
367+ Rvalue :: BinaryOp ( BinOp :: Eq , rhs. to_copy ( ) , neg_1) ) ;
368368 self . cfg . push_assign ( block, source_info, & is_min,
369- Rvalue :: BinaryOp ( BinOp :: Eq , lhs. clone ( ) , min) ) ;
369+ Rvalue :: BinaryOp ( BinOp :: Eq , lhs. to_copy ( ) , min) ) ;
370370
371371 let is_neg_1 = Operand :: Move ( is_neg_1) ;
372372 let is_min = Operand :: Move ( is_min) ;
0 commit comments