s/eval_usize/eval_target_usize/ for clarity

This commit is contained in:
Oli Scherer 2023-02-14 08:51:19 +00:00
parent c3c6d73b04
commit 936bf29d4c
48 changed files with 347 additions and 259 deletions

View file

@ -857,7 +857,7 @@ fn codegen_stmt<'tcx>(
fn codegen_array_len<'tcx>(fx: &mut FunctionCx<'_, '_, 'tcx>, place: CPlace<'tcx>) -> Value {
match *place.layout().ty.kind() {
ty::Array(_elem_ty, len) => {
let len = fx.monomorphize(len).eval_usize(fx.tcx, ParamEnv::reveal_all()) as i64;
let len = fx.monomorphize(len).eval_target_usize(fx.tcx, ParamEnv::reveal_all()) as i64;
fx.bcx.ins().iconst(fx.pointer_type, len)
}
ty::Slice(_elem_ty) => {