@@ -57,7 +57,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
57
57
} ;
58
58
59
59
for i in 0 ..dest_len {
60
- let op = this. read_immediate ( & this. project_index ( & op, i) ?. into ( ) ) ?;
60
+ let op = this. read_immediate ( & this. project_index ( & op, i) ?) ?;
61
61
let dest = this. project_index ( & dest, i) ?;
62
62
let val = match which {
63
63
Op :: MirOp ( mir_op) => this. unary_op ( mir_op, & op) ?. to_scalar ( ) ,
@@ -172,8 +172,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
172
172
} ;
173
173
174
174
for i in 0 ..dest_len {
175
- let left = this. read_immediate ( & this. project_index ( & left, i) ?. into ( ) ) ?;
176
- let right = this. read_immediate ( & this. project_index ( & right, i) ?. into ( ) ) ?;
175
+ let left = this. read_immediate ( & this. project_index ( & left, i) ?) ?;
176
+ let right = this. read_immediate ( & this. project_index ( & right, i) ?) ?;
177
177
let dest = this. project_index ( & dest, i) ?;
178
178
let val = match which {
179
179
Op :: MirOp ( mir_op) => {
@@ -232,9 +232,9 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
232
232
assert_eq ! ( dest_len, c_len) ;
233
233
234
234
for i in 0 ..dest_len {
235
- let a = this. read_scalar ( & this. project_index ( & a, i) ?. into ( ) ) ?;
236
- let b = this. read_scalar ( & this. project_index ( & b, i) ?. into ( ) ) ?;
237
- let c = this. read_scalar ( & this. project_index ( & c, i) ?. into ( ) ) ?;
235
+ let a = this. read_scalar ( & this. project_index ( & a, i) ?) ?;
236
+ let b = this. read_scalar ( & this. project_index ( & b, i) ?) ?;
237
+ let c = this. read_scalar ( & this. project_index ( & c, i) ?) ?;
238
238
let dest = this. project_index ( & dest, i) ?;
239
239
240
240
// Works for f32 and f64.
@@ -295,13 +295,13 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
295
295
} ;
296
296
297
297
// Initialize with first lane, then proceed with the rest.
298
- let mut res = this. read_immediate ( & this. project_index ( & op, 0 ) ?. into ( ) ) ?;
298
+ let mut res = this. read_immediate ( & this. project_index ( & op, 0 ) ?) ?;
299
299
if matches ! ( which, Op :: MirOpBool ( _) ) {
300
300
// Convert to `bool` scalar.
301
301
res = imm_from_bool ( simd_element_to_bool ( res) ?) ;
302
302
}
303
303
for i in 1 ..op_len {
304
- let op = this. read_immediate ( & this. project_index ( & op, i) ?. into ( ) ) ?;
304
+ let op = this. read_immediate ( & this. project_index ( & op, i) ?) ?;
305
305
res = match which {
306
306
Op :: MirOp ( mir_op) => {
307
307
this. binary_op ( mir_op, & res, & op) ?
@@ -355,7 +355,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
355
355
356
356
let mut res = init;
357
357
for i in 0 ..op_len {
358
- let op = this. read_immediate ( & this. project_index ( & op, i) ?. into ( ) ) ?;
358
+ let op = this. read_immediate ( & this. project_index ( & op, i) ?) ?;
359
359
res = this. binary_op ( mir_op, & res, & op) ?;
360
360
}
361
361
this. write_immediate ( * res, dest) ?;
@@ -372,9 +372,9 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
372
372
assert_eq ! ( dest_len, no_len) ;
373
373
374
374
for i in 0 ..dest_len {
375
- let mask = this. read_immediate ( & this. project_index ( & mask, i) ?. into ( ) ) ?;
376
- let yes = this. read_immediate ( & this. project_index ( & yes, i) ?. into ( ) ) ?;
377
- let no = this. read_immediate ( & this. project_index ( & no, i) ?. into ( ) ) ?;
375
+ let mask = this. read_immediate ( & this. project_index ( & mask, i) ?) ?;
376
+ let yes = this. read_immediate ( & this. project_index ( & yes, i) ?) ?;
377
+ let no = this. read_immediate ( & this. project_index ( & no, i) ?) ?;
378
378
let dest = this. project_index ( & dest, i) ?;
379
379
380
380
let val = if simd_element_to_bool ( mask) ? { yes } else { no } ;
@@ -403,8 +403,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
403
403
& 1u64
404
404
. checked_shl ( simd_bitmask_index ( i, dest_len, this. data_layout ( ) . endian ) )
405
405
. unwrap ( ) ;
406
- let yes = this. read_immediate ( & this. project_index ( & yes, i. into ( ) ) ?. into ( ) ) ?;
407
- let no = this. read_immediate ( & this. project_index ( & no, i. into ( ) ) ?. into ( ) ) ?;
406
+ let yes = this. read_immediate ( & this. project_index ( & yes, i. into ( ) ) ?) ?;
407
+ let no = this. read_immediate ( & this. project_index ( & no, i. into ( ) ) ?) ?;
408
408
let dest = this. project_index ( & dest, i. into ( ) ) ?;
409
409
410
410
let val = if mask != 0 { yes } else { no } ;
@@ -435,7 +435,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
435
435
let from_exposed_cast = intrinsic_name == "from_exposed_addr" ;
436
436
437
437
for i in 0 ..dest_len {
438
- let op = this. read_immediate ( & this. project_index ( & op, i) ?. into ( ) ) ?;
438
+ let op = this. read_immediate ( & this. project_index ( & op, i) ?) ?;
439
439
let dest = this. project_index ( & dest, i) ?;
440
440
441
441
let val = match ( op. layout . ty . kind ( ) , dest. layout . ty . kind ( ) ) {
@@ -503,10 +503,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
503
503
let dest = this. project_index ( & dest, i) ?;
504
504
505
505
let val = if src_index < left_len {
506
- this. read_immediate ( & this. project_index ( & left, src_index) ?. into ( ) ) ?
506
+ this. read_immediate ( & this. project_index ( & left, src_index) ?) ?
507
507
} else if src_index < left_len. checked_add ( right_len) . unwrap ( ) {
508
508
let right_idx = src_index. checked_sub ( left_len) . unwrap ( ) ;
509
- this. read_immediate ( & this. project_index ( & right, right_idx) ?. into ( ) ) ?
509
+ this. read_immediate ( & this. project_index ( & right, right_idx) ?) ?
510
510
} else {
511
511
span_bug ! (
512
512
this. cur_span( ) ,
@@ -528,14 +528,14 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
528
528
assert_eq ! ( dest_len, mask_len) ;
529
529
530
530
for i in 0 ..dest_len {
531
- let passthru = this. read_immediate ( & this. project_index ( & passthru, i) ?. into ( ) ) ?;
532
- let ptr = this. read_immediate ( & this. project_index ( & ptrs, i) ?. into ( ) ) ?;
533
- let mask = this. read_immediate ( & this. project_index ( & mask, i) ?. into ( ) ) ?;
531
+ let passthru = this. read_immediate ( & this. project_index ( & passthru, i) ?) ?;
532
+ let ptr = this. read_immediate ( & this. project_index ( & ptrs, i) ?) ?;
533
+ let mask = this. read_immediate ( & this. project_index ( & mask, i) ?) ?;
534
534
let dest = this. project_index ( & dest, i) ?;
535
535
536
536
let val = if simd_element_to_bool ( mask) ? {
537
- let place = this. deref_operand ( & ptr. into ( ) ) ?;
538
- this. read_immediate ( & place. into ( ) ) ?
537
+ let place = this. deref_operand ( & ptr) ?;
538
+ this. read_immediate ( & place) ?
539
539
} else {
540
540
passthru
541
541
} ;
@@ -552,12 +552,12 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
552
552
assert_eq ! ( ptrs_len, mask_len) ;
553
553
554
554
for i in 0 ..ptrs_len {
555
- let value = this. read_immediate ( & this. project_index ( & value, i) ?. into ( ) ) ?;
556
- let ptr = this. read_immediate ( & this. project_index ( & ptrs, i) ?. into ( ) ) ?;
557
- let mask = this. read_immediate ( & this. project_index ( & mask, i) ?. into ( ) ) ?;
555
+ let value = this. read_immediate ( & this. project_index ( & value, i) ?) ?;
556
+ let ptr = this. read_immediate ( & this. project_index ( & ptrs, i) ?) ?;
557
+ let mask = this. read_immediate ( & this. project_index ( & mask, i) ?) ?;
558
558
559
559
if simd_element_to_bool ( mask) ? {
560
- let place = this. deref_operand ( & ptr. into ( ) ) ?;
560
+ let place = this. deref_operand ( & ptr) ?;
561
561
this. write_immediate ( * value, & place) ?;
562
562
}
563
563
}
@@ -578,7 +578,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
578
578
579
579
let mut res = 0u64 ;
580
580
for i in 0 ..op_len {
581
- let op = this. read_immediate ( & this. project_index ( & op, i. into ( ) ) ?. into ( ) ) ?;
581
+ let op = this. read_immediate ( & this. project_index ( & op, i. into ( ) ) ?) ?;
582
582
if simd_element_to_bool ( op) ? {
583
583
res |= 1u64
584
584
. checked_shl ( simd_bitmask_index ( i, op_len, this. data_layout ( ) . endian ) )
0 commit comments