@@ -538,7 +538,7 @@ impl CloneShimBuilder<'tcx> {
538
538
// BB #2
539
539
// `dest[i] = Clone::clone(src[beg])`;
540
540
// Goto #3 if ok, #5 if unwinding happens.
541
- let dest_field = self . tcx . mk_place_index ( dest. clone ( ) , beg) ;
541
+ let dest_field = self . tcx . mk_place_index ( dest, beg) ;
542
542
let src_field = self . tcx . mk_place_index ( src, beg) ;
543
543
self . make_clone_call ( dest_field, src_field, ty, BasicBlock :: new ( 3 ) , BasicBlock :: new ( 5 ) ) ;
544
544
@@ -620,9 +620,9 @@ impl CloneShimBuilder<'tcx> {
620
620
let mut previous_field = None ;
621
621
for ( i, ity) in tys. enumerate ( ) {
622
622
let field = Field :: new ( i) ;
623
- let src_field = self . tcx . mk_place_field ( src. clone ( ) , field, ity) ;
623
+ let src_field = self . tcx . mk_place_field ( src, field, ity) ;
624
624
625
- let dest_field = self . tcx . mk_place_field ( dest. clone ( ) , field, ity) ;
625
+ let dest_field = self . tcx . mk_place_field ( dest, field, ity) ;
626
626
627
627
// #(2i + 1) is the cleanup block for the previous clone operation
628
628
let cleanup_block = self . block_index_offset ( 1 ) ;
@@ -633,7 +633,7 @@ impl CloneShimBuilder<'tcx> {
633
633
// BB #(2i)
634
634
// `dest.i = Clone::clone(&src.i);`
635
635
// Goto #(2i + 2) if ok, #(2i + 1) if unwinding happens.
636
- self . make_clone_call ( dest_field. clone ( ) , src_field, ity, next_block, cleanup_block) ;
636
+ self . make_clone_call ( dest_field, src_field, ity, next_block, cleanup_block) ;
637
637
638
638
// BB #(2i + 1) (cleanup)
639
639
if let Some ( ( previous_field, previous_cleanup) ) = previous_field. take ( ) {
0 commit comments