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:
commit
31d7e514ab
51 changed files with 181 additions and 181 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue