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

@ -261,7 +261,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
// Arrays give us `[]`, `[{ty}; _]` and `[{ty}; N]`
if let ty::Array(aty, len) = self_ty.kind() {
flags.push((sym::_Self, Some("[]".to_string())));
let len = len.kind().try_to_value().and_then(|v| v.try_to_machine_usize(self.tcx));
let len = len.kind().try_to_value().and_then(|v| v.try_to_target_usize(self.tcx));
flags.push((sym::_Self, Some(format!("[{}; _]", aty))));
if let Some(n) = len {
flags.push((sym::_Self, Some(format!("[{}; {}]", aty, n))));