@@ -429,7 +429,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
429
429
self . codegen_consume ( bx, mir:: PlaceRef { local, projection : proj_base } )
430
430
. deref ( bx. cx ( ) )
431
431
}
432
- mir:: PlaceRef { local, projection : [ proj_base @ .., elem] } => {
432
+ mir:: PlaceRef { local, projection : & [ ref proj_base @ .., elem] } => {
433
433
// FIXME turn this recursion into iteration
434
434
let cg_base =
435
435
self . codegen_place ( bx, mir:: PlaceRef { local, projection : proj_base } ) ;
@@ -440,7 +440,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
440
440
cg_base. project_field ( bx, field. index ( ) )
441
441
}
442
442
mir:: ProjectionElem :: Index ( index) => {
443
- let index = & mir:: Operand :: Copy ( mir:: Place :: from ( * index) ) ;
443
+ let index = & mir:: Operand :: Copy ( mir:: Place :: from ( index) ) ;
444
444
let index = self . codegen_operand ( bx, index) ;
445
445
let llindex = index. immediate ( ) ;
446
446
cg_base. project_index ( bx, llindex)
@@ -450,22 +450,22 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
450
450
from_end : false ,
451
451
min_length : _,
452
452
} => {
453
- let lloffset = bx. cx ( ) . const_usize ( * offset as u64 ) ;
453
+ let lloffset = bx. cx ( ) . const_usize ( offset as u64 ) ;
454
454
cg_base. project_index ( bx, lloffset)
455
455
}
456
456
mir:: ProjectionElem :: ConstantIndex {
457
457
offset,
458
458
from_end : true ,
459
459
min_length : _,
460
460
} => {
461
- let lloffset = bx. cx ( ) . const_usize ( * offset as u64 ) ;
461
+ let lloffset = bx. cx ( ) . const_usize ( offset as u64 ) ;
462
462
let lllen = cg_base. len ( bx. cx ( ) ) ;
463
463
let llindex = bx. sub ( lllen, lloffset) ;
464
464
cg_base. project_index ( bx, llindex)
465
465
}
466
466
mir:: ProjectionElem :: Subslice { from, to, from_end } => {
467
467
let mut subslice =
468
- cg_base. project_index ( bx, bx. cx ( ) . const_usize ( * from as u64 ) ) ;
468
+ cg_base. project_index ( bx, bx. cx ( ) . const_usize ( from as u64 ) ) ;
469
469
let projected_ty =
470
470
PlaceTy :: from_ty ( cg_base. layout . ty ) . projection_ty ( tcx, elem) . ty ;
471
471
subslice. layout = bx. cx ( ) . layout_of ( self . monomorphize ( & projected_ty) ) ;
@@ -474,7 +474,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
474
474
assert ! ( from_end, "slice subslices should be `from_end`" ) ;
475
475
subslice. llextra = Some ( bx. sub (
476
476
cg_base. llextra . unwrap ( ) ,
477
- bx. cx ( ) . const_usize ( ( * from as u64 ) + ( * to as u64 ) ) ,
477
+ bx. cx ( ) . const_usize ( ( from as u64 ) + ( to as u64 ) ) ,
478
478
) ) ;
479
479
}
480
480
@@ -487,7 +487,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
487
487
488
488
subslice
489
489
}
490
- mir:: ProjectionElem :: Downcast ( _, v) => cg_base. project_downcast ( bx, * v) ,
490
+ mir:: ProjectionElem :: Downcast ( _, v) => cg_base. project_downcast ( bx, v) ,
491
491
}
492
492
}
493
493
} ;
0 commit comments