@@ -205,12 +205,7 @@ fn build_drop_shim<'a, 'tcx>(tcx: ty::TyCtxt<'a, 'tcx, 'tcx>,
205
205
patch : MirPatch :: new ( & mir) ,
206
206
tcx, param_env
207
207
} ;
208
- let dropee = Lvalue :: Projection (
209
- box Projection {
210
- base : Lvalue :: Local ( Local :: new ( 1 +0 ) ) ,
211
- elem : ProjectionElem :: Deref
212
- }
213
- ) ;
208
+ let dropee = Lvalue :: Local ( Local :: new ( 1 +0 ) ) . deref ( ) ;
214
209
let resume_block = elaborator. patch . resume_block ( ) ;
215
210
elaborate_drops:: elaborate_drop (
216
211
& mut elaborator,
@@ -310,9 +305,7 @@ fn build_call_shim<'a, 'tcx>(tcx: ty::TyCtxt<'a, 'tcx, 'tcx>,
310
305
311
306
let rcvr = match rcvr_adjustment {
312
307
Adjustment :: Identity => Operand :: Consume ( rcvr_l) ,
313
- Adjustment :: Deref => Operand :: Consume ( Lvalue :: Projection (
314
- box Projection { base : rcvr_l, elem : ProjectionElem :: Deref }
315
- ) ) ,
308
+ Adjustment :: Deref => Operand :: Consume ( rcvr_l. deref ( ) ) ,
316
309
Adjustment :: RefMut => {
317
310
// let rcvr = &mut rcvr;
318
311
let re_erased = tcx. mk_region ( ty:: ReErased ) ;
@@ -352,10 +345,7 @@ fn build_call_shim<'a, 'tcx>(tcx: ty::TyCtxt<'a, 'tcx, 'tcx>,
352
345
if let Some ( untuple_args) = untuple_args {
353
346
args. extend ( untuple_args. iter ( ) . enumerate ( ) . map ( |( i, ity) | {
354
347
let arg_lv = Lvalue :: Local ( Local :: new ( 1 +1 ) ) ;
355
- Operand :: Consume ( Lvalue :: Projection ( box Projection {
356
- base : arg_lv,
357
- elem : ProjectionElem :: Field ( Field :: new ( i) , * ity)
358
- } ) )
348
+ Operand :: Consume ( arg_lv. field ( Field :: new ( i) , * ity) )
359
349
} ) ) ;
360
350
} else {
361
351
args. extend ( ( 1 ..sig. inputs ( ) . len ( ) ) . map ( |i| {
0 commit comments