@@ -212,7 +212,7 @@ where
212
212
assert_eq ! ( self . elaborator. param_env( ) . reveal, Reveal :: All ) ;
213
213
let field_ty =
214
214
tcx. normalize_erasing_regions ( self . elaborator . param_env ( ) , f. ty ( tcx, substs) ) ;
215
- ( tcx. mk_place_field ( base_place. clone ( ) , field, field_ty) , subpath)
215
+ ( tcx. mk_place_field ( base_place, field, field_ty) , subpath)
216
216
} )
217
217
. collect ( )
218
218
}
@@ -340,7 +340,7 @@ where
340
340
. enumerate ( )
341
341
. map ( |( i, & ty) | {
342
342
(
343
- self . tcx ( ) . mk_place_field ( self . place . clone ( ) , Field :: new ( i) , ty) ,
343
+ self . tcx ( ) . mk_place_field ( self . place , Field :: new ( i) , ty) ,
344
344
self . elaborator . field_subpath ( self . path , Field :: new ( i) ) ,
345
345
)
346
346
} )
@@ -353,7 +353,7 @@ where
353
353
fn open_drop_for_box ( & mut self , adt : & ' tcx ty:: AdtDef , substs : SubstsRef < ' tcx > ) -> BasicBlock {
354
354
debug ! ( "open_drop_for_box({:?}, {:?}, {:?})" , self , adt, substs) ;
355
355
356
- let interior = self . tcx ( ) . mk_place_deref ( self . place . clone ( ) ) ;
356
+ let interior = self . tcx ( ) . mk_place_deref ( self . place ) ;
357
357
let interior_path = self . elaborator . deref_subpath ( self . path ) ;
358
358
359
359
let succ = self . succ ; // FIXME(#43234)
@@ -434,7 +434,7 @@ where
434
434
435
435
if let Some ( variant_path) = subpath {
436
436
let base_place = tcx. mk_place_elem (
437
- self . place . clone ( ) ,
437
+ self . place ,
438
438
ProjectionElem :: Downcast ( Some ( variant. ident . name ) , variant_index) ,
439
439
) ;
440
440
let fields = self . move_paths_for_fields ( base_place, variant_path, & variant, substs) ;
@@ -622,7 +622,7 @@ where
622
622
( Rvalue :: Use ( copy ( cur. into ( ) ) ) , Rvalue :: BinaryOp ( BinOp :: Offset , move_ ( cur. into ( ) ) , one) )
623
623
} else {
624
624
(
625
- Rvalue :: AddressOf ( Mutability :: Mut , tcx. mk_place_index ( self . place . clone ( ) , cur) ) ,
625
+ Rvalue :: AddressOf ( Mutability :: Mut , tcx. mk_place_index ( self . place , cur) ) ,
626
626
Rvalue :: BinaryOp ( BinOp :: Add , move_ ( cur. into ( ) ) , one) ,
627
627
)
628
628
} ;
@@ -654,7 +654,7 @@ where
654
654
self . elaborator . patch ( ) . patch_terminator (
655
655
drop_block,
656
656
TerminatorKind :: Drop {
657
- location : tcx. mk_place_deref ( ptr. clone ( ) ) ,
657
+ location : tcx. mk_place_deref ( ptr) ,
658
658
target : loop_block,
659
659
unwind : unwind. into_option ( ) ,
660
660
} ,
@@ -682,7 +682,7 @@ where
682
682
. map ( |i| {
683
683
(
684
684
tcx. mk_place_elem (
685
- self . place . clone ( ) ,
685
+ self . place ,
686
686
ProjectionElem :: ConstantIndex {
687
687
offset : i,
688
688
min_length : size,
@@ -719,8 +719,8 @@ where
719
719
switch_ty : tcx. types . usize ,
720
720
values : From :: from ( USIZE_SWITCH_ZERO ) ,
721
721
targets : vec ! [
722
- self . drop_loop_pair( ety, false , len. clone ( ) ) ,
723
- self . drop_loop_pair( ety, true , len. clone ( ) ) ,
722
+ self . drop_loop_pair( ety, false , len) ,
723
+ self . drop_loop_pair( ety, true , len) ,
724
724
] ,
725
725
} ,
726
726
} ) ,
@@ -912,7 +912,7 @@ where
912
912
. map ( |( i, f) | {
913
913
let field = Field :: new ( i) ;
914
914
let field_ty = f. ty ( tcx, substs) ;
915
- Operand :: Move ( tcx. mk_place_field ( self . place . clone ( ) , field, field_ty) )
915
+ Operand :: Move ( tcx. mk_place_field ( self . place , field, field_ty) )
916
916
} )
917
917
. collect ( ) ;
918
918
0 commit comments