about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret/eval_context.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-02-16 10:54:28 +0100
committerRalf Jung <post@ralfj.de>2023-02-16 10:54:28 +0100
commit044aa87d7808f89c38a79d8c68d03249246bf9cb (patch)
tree84aa26d240aff1e24fe4ea6b57439dc885e98f44 /compiler/rustc_const_eval/src/interpret/eval_context.rs
parentf0ab39b60ef631da86a5069935fdc9ba2e5d0def (diff)
parentfd8947095678c61c5cbc70509e053621baca282d (diff)
Merge from rustc
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/eval_context.rs')
-rw-r--r--compiler/rustc_const_eval/src/interpret/eval_context.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/eval_context.rs b/compiler/rustc_const_eval/src/interpret/eval_context.rs
index d13fed7a9c2..c8bf769cfd8 100644
--- a/compiler/rustc_const_eval/src/interpret/eval_context.rs
+++ b/compiler/rustc_const_eval/src/interpret/eval_context.rs
@@ -639,7 +639,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
             }
 
             ty::Slice(_) | ty::Str => {
-                let len = metadata.unwrap_meta().to_machine_usize(self)?;
+                let len = metadata.unwrap_meta().to_target_usize(self)?;
                 let elem = layout.field(self, 0);
 
                 // Make sure the slice is not too big.