Use target instead of machine for mir interpreter integer handling.

The naming of `machine` only makes sense from a mir interpreter internals perspective, but outside users talk about the `target` platform
This commit is contained in:
Oli Scherer 2023-02-14 14:31:26 +00:00
parent 068161ea48
commit 38b7cdf393
51 changed files with 181 additions and 181 deletions

View file

@ -155,7 +155,7 @@ pub(crate) fn deref_mir_constant<'tcx>(
// In case of unsized types, figure out the real type behind.
MemPlaceMeta::Meta(scalar) => match mplace.layout.ty.kind() {
ty::Str => bug!("there's no sized equivalent of a `str`"),
ty::Slice(elem_ty) => tcx.mk_array(*elem_ty, scalar.to_machine_usize(&tcx).unwrap()),
ty::Slice(elem_ty) => tcx.mk_array(*elem_ty, scalar.to_target_usize(&tcx).unwrap()),
_ => bug!(
"type {} should not have metadata, but had {:?}",
mplace.layout.ty,