@@ -178,7 +178,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
178
178
source_info,
179
179
expect,
180
180
expect_ty,
181
- ref_str,
181
+ Operand :: Copy ( ref_str) ,
182
182
ref_str_ty,
183
183
) ;
184
184
} else if !ty. is_scalar ( ) {
@@ -191,20 +191,19 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
191
191
source_info,
192
192
expect,
193
193
expect_ty,
194
- place,
194
+ Operand :: Copy ( place) ,
195
195
ty,
196
196
) ;
197
197
} else {
198
198
assert_eq ! ( expect_ty, ty) ;
199
- let val = Operand :: Copy ( place) ;
200
199
self . compare (
201
200
block,
202
201
success_block,
203
202
fail_block,
204
203
source_info,
205
204
BinOp :: Eq ,
206
205
expect,
207
- val ,
206
+ Operand :: Copy ( place ) ,
208
207
) ;
209
208
}
210
209
}
@@ -377,7 +376,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
377
376
source_info : SourceInfo ,
378
377
mut expect : Operand < ' tcx > ,
379
378
expect_ty : Ty < ' tcx > ,
380
- mut val : Place < ' tcx > ,
379
+ mut val : Operand < ' tcx > ,
381
380
mut ty : Ty < ' tcx > ,
382
381
) {
383
382
// If we're using `b"..."` as a pattern, we need to insert an
@@ -413,11 +412,11 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
413
412
PointerCoercion :: Unsize ,
414
413
CoercionSource :: Implicit ,
415
414
) ,
416
- Operand :: Copy ( val) ,
415
+ val,
417
416
ty,
418
417
) ,
419
418
) ;
420
- val = temp;
419
+ val = Operand :: Copy ( temp) ;
421
420
}
422
421
if opt_ref_test_ty. is_some ( ) {
423
422
let slice = self . temp ( ty, source_info. span ) ;
@@ -473,11 +472,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
473
472
474
473
const_ : method,
475
474
} ) ) ,
476
- args : [ Spanned { node : Operand :: Copy ( val) , span : DUMMY_SP } , Spanned {
477
- node : expect,
478
- span : DUMMY_SP ,
479
- } ]
480
- . into ( ) ,
475
+ args : [ Spanned { node : val, span : DUMMY_SP } , Spanned { node : expect, span : DUMMY_SP } ]
476
+ . into ( ) ,
481
477
destination : eq_result,
482
478
target : Some ( eq_block) ,
483
479
unwind : UnwindAction :: Continue ,
0 commit comments