Rollup merge of #108047 - oli-obk:machine->🞋, r=RalfJung

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. As per https://github.com/rust-lang/rust/pull/108029#issuecomment-1429791015

r? `@RalfJung`
This commit is contained in:
Matthias Krüger 2023-02-15 21:30:57 +01:00 committed by GitHub
commit 31d7e514ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 181 additions and 181 deletions

View file

@ -2357,10 +2357,10 @@ impl<'tcx> ConstantKind<'tcx> {
) -> Option<u64> {
match self {
Self::Ty(ct) => ct.try_eval_target_usize(tcx, param_env),
Self::Val(val, _) => val.try_to_machine_usize(tcx),
Self::Val(val, _) => val.try_to_target_usize(tcx),
Self::Unevaluated(uneval, _) => {
match tcx.const_eval_resolve(param_env, *uneval, None) {
Ok(val) => val.try_to_machine_usize(tcx),
Ok(val) => val.try_to_target_usize(tcx),
Err(_) => None,
}
}