@@ -387,11 +387,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
387
387
make_target_blocks : impl FnOnce ( & mut Self ) -> Vec < BasicBlock > ,
388
388
source_info : SourceInfo ,
389
389
value : ConstantKind < ' tcx > ,
390
- place : Place < ' tcx > ,
390
+ mut val : Place < ' tcx > ,
391
391
mut ty : Ty < ' tcx > ,
392
392
) {
393
393
let mut expect = self . literal_operand ( source_info. span , value) ;
394
- let mut val = Operand :: Copy ( place) ;
395
394
396
395
// If we're using `b"..."` as a pattern, we need to insert an
397
396
// unsizing coercion, as the byte string has the type `&[u8; N]`.
@@ -421,9 +420,13 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
421
420
block,
422
421
source_info,
423
422
temp,
424
- Rvalue :: Cast ( CastKind :: Pointer ( PointerCast :: Unsize ) , val, ty) ,
423
+ Rvalue :: Cast (
424
+ CastKind :: Pointer ( PointerCast :: Unsize ) ,
425
+ Operand :: Copy ( val) ,
426
+ ty,
427
+ ) ,
425
428
) ;
426
- val = Operand :: Move ( temp) ;
429
+ val = temp;
427
430
}
428
431
if opt_ref_test_ty. is_some ( ) {
429
432
let slice = self . temp ( ty, source_info. span ) ;
@@ -463,7 +466,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
463
466
464
467
literal : method,
465
468
} ) ) ,
466
- args : vec ! [ val, expect] ,
469
+ args : vec ! [ Operand :: Copy ( val) , expect] ,
467
470
destination : eq_result,
468
471
target : Some ( eq_block) ,
469
472
unwind : UnwindAction :: Continue ,
0 commit comments