@@ -100,7 +100,7 @@ where
100100
101101 source_info : SourceInfo ,
102102
103- place : & ' l Place < ' tcx > ,
103+ place : Place < ' tcx > ,
104104 path : D :: Path ,
105105 succ : BasicBlock ,
106106 unwind : Unwind ,
@@ -109,7 +109,7 @@ where
109109pub fn elaborate_drop < ' b , ' tcx , D > (
110110 elaborator : & mut D ,
111111 source_info : SourceInfo ,
112- place : & Place < ' tcx > ,
112+ place : Place < ' tcx > ,
113113 path : D :: Path ,
114114 succ : BasicBlock ,
115115 unwind : Unwind ,
@@ -126,7 +126,7 @@ where
126126 D : DropElaborator < ' b , ' tcx > ,
127127 ' tcx : ' b ,
128128{
129- fn place_ty ( & self , place : & Place < ' tcx > ) -> Ty < ' tcx > {
129+ fn place_ty ( & self , place : Place < ' tcx > ) -> Ty < ' tcx > {
130130 place. ty ( self . elaborator . body ( ) , self . tcx ( ) ) . ty
131131 }
132132
@@ -168,7 +168,7 @@ where
168168 self . elaborator . patch ( ) . patch_terminator (
169169 bb,
170170 TerminatorKind :: Drop {
171- location : * self . place ,
171+ location : self . place ,
172172 target : self . succ ,
173173 unwind : self . unwind . into_option ( ) ,
174174 } ,
@@ -195,7 +195,7 @@ where
195195 /// (the move path is `None` if the field is a rest field).
196196 fn move_paths_for_fields (
197197 & self ,
198- base_place : & Place < ' tcx > ,
198+ base_place : Place < ' tcx > ,
199199 variant_path : D :: Path ,
200200 variant : & ' tcx ty:: VariantDef ,
201201 substs : SubstsRef < ' tcx > ,
@@ -219,7 +219,7 @@ where
219219
220220 fn drop_subpath (
221221 & mut self ,
222- place : & Place < ' tcx > ,
222+ place : Place < ' tcx > ,
223223 path : Option < D :: Path > ,
224224 succ : BasicBlock ,
225225 unwind : Unwind ,
@@ -267,12 +267,10 @@ where
267267 ) -> Vec < BasicBlock > {
268268 Some ( succ)
269269 . into_iter ( )
270- . chain ( fields. iter ( ) . rev ( ) . zip ( unwind_ladder) . map (
271- |( & ( ref place, path) , & unwind_succ) | {
272- succ = self . drop_subpath ( place, path, succ, unwind_succ) ;
273- succ
274- } ,
275- ) )
270+ . chain ( fields. iter ( ) . rev ( ) . zip ( unwind_ladder) . map ( |( & ( place, path) , & unwind_succ) | {
271+ succ = self . drop_subpath ( place, path, succ, unwind_succ) ;
272+ succ
273+ } ) )
276274 . collect ( )
277275 }
278276
@@ -315,7 +313,7 @@ where
315313 debug ! ( "drop_ladder({:?}, {:?})" , self , fields) ;
316314
317315 let mut fields = fields;
318- fields. retain ( |& ( ref place, _) | {
316+ fields. retain ( |& ( place, _) | {
319317 self . place_ty ( place) . needs_drop ( self . tcx ( ) , self . elaborator . param_env ( ) )
320318 } ) ;
321319
@@ -364,7 +362,7 @@ where
364362 let unwind_succ =
365363 self . unwind . map ( |unwind| self . box_free_block ( adt, substs, unwind, Unwind :: InCleanup ) ) ;
366364
367- self . drop_subpath ( & interior, interior_path, succ, unwind_succ)
365+ self . drop_subpath ( interior, interior_path, succ, unwind_succ)
368366 }
369367
370368 fn open_drop_for_adt ( & mut self , adt : & ' tcx ty:: AdtDef , substs : SubstsRef < ' tcx > ) -> BasicBlock {
@@ -439,8 +437,7 @@ where
439437 self . place . clone ( ) ,
440438 ProjectionElem :: Downcast ( Some ( variant. ident . name ) , variant_index) ,
441439 ) ;
442- let fields =
443- self . move_paths_for_fields ( & base_place, variant_path, & variant, substs) ;
440+ let fields = self . move_paths_for_fields ( base_place, variant_path, & variant, substs) ;
444441 values. push ( discr. val ) ;
445442 if let Unwind :: To ( unwind) = unwind {
446443 // We can't use the half-ladder from the original
@@ -527,7 +524,7 @@ where
527524 // way lies only trouble.
528525 let discr_ty = adt. repr . discr_type ( ) . to_ty ( self . tcx ( ) ) ;
529526 let discr = Place :: from ( self . new_temp ( discr_ty) ) ;
530- let discr_rv = Rvalue :: Discriminant ( * self . place ) ;
527+ let discr_rv = Rvalue :: Discriminant ( self . place ) ;
531528 let switch_block = BasicBlockData {
532529 statements : vec ! [ self . assign( & discr, discr_rv) ] ,
533530 terminator : Some ( Terminator {
@@ -564,7 +561,7 @@ where
564561 Rvalue :: Ref (
565562 tcx. lifetimes. re_erased,
566563 BorrowKind :: Mut { allow_two_phase_borrow: false } ,
567- * self . place,
564+ self . place,
568565 ) ,
569566 ) ] ,
570567 terminator : Some ( Terminator {
@@ -712,7 +709,7 @@ where
712709 let base_block = BasicBlockData {
713710 statements : vec ! [
714711 self . assign( elem_size, Rvalue :: NullaryOp ( NullOp :: SizeOf , ety) ) ,
715- self . assign( len, Rvalue :: Len ( * self . place) ) ,
712+ self . assign( len, Rvalue :: Len ( self . place) ) ,
716713 ] ,
717714 is_cleanup : self . unwind . is_cleanup ( ) ,
718715 terminator : Some ( Terminator {
@@ -761,7 +758,7 @@ where
761758 // cur = tmp as *mut T;
762759 // end = Offset(cur, len);
763760 vec ! [
764- self . assign( & tmp, Rvalue :: AddressOf ( Mutability :: Mut , * self . place) ) ,
761+ self . assign( & tmp, Rvalue :: AddressOf ( Mutability :: Mut , self . place) ) ,
765762 self . assign( & cur, Rvalue :: Cast ( CastKind :: Misc , Operand :: Move ( tmp) , iter_ty) ) ,
766763 self . assign(
767764 & length_or_end,
@@ -935,7 +932,7 @@ where
935932
936933 fn drop_block ( & mut self , target : BasicBlock , unwind : Unwind ) -> BasicBlock {
937934 let block =
938- TerminatorKind :: Drop { location : * self . place , target, unwind : unwind. into_option ( ) } ;
935+ TerminatorKind :: Drop { location : self . place , target, unwind : unwind. into_option ( ) } ;
939936 self . new_block ( unwind, block)
940937 }
941938
0 commit comments