Skip to content

Commit 01966ec

Browse files
authored
Rollup merge of #108029 - oli-obk:🞋_usize, r=RalfJung
s/eval_usize/eval_target_usize/ for clarity r? `@nnethercote` as discussed in https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/.60Const.60.20and.20.60usize.60.2F.60u64.60 it is unclear what `usize` means and why we use a `u64` for something talking about `usize`. This renaming should make it clear that we're talking about `usize`s on the target platform, irrespective of the compiler host platform.
2 parents 582a6c7 + 88bbba8 commit 01966ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shims/intrinsics/simd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
469469
let ty::Array(_, index_len) = index.layout.ty.kind() else {
470470
span_bug!(this.cur_span(), "simd_shuffle index argument has non-array type {}", index.layout.ty)
471471
};
472-
let index_len = index_len.eval_usize(*this.tcx, this.param_env());
472+
let index_len = index_len.eval_target_usize(*this.tcx, this.param_env());
473473

474474
assert_eq!(left_len, right_len);
475475
assert_eq!(index_len, dest_len);

0 commit comments

Comments
 (0)