about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret/step.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/step.rs
parentf0ab39b60ef631da86a5069935fdc9ba2e5d0def (diff)
parentfd8947095678c61c5cbc70509e053621baca282d (diff)
Merge from rustc
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/step.rs')
-rw-r--r--compiler/rustc_const_eval/src/interpret/step.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/step.rs b/compiler/rustc_const_eval/src/interpret/step.rs
index 7d9a98da08a..8252e73c5d9 100644
--- a/compiler/rustc_const_eval/src/interpret/step.rs
+++ b/compiler/rustc_const_eval/src/interpret/step.rs
@@ -242,7 +242,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
                 let src = self.eval_place(place)?;
                 let op = self.place_to_op(&src)?;
                 let len = op.len(self)?;
-                self.write_scalar(Scalar::from_machine_usize(len, self), &dest)?;
+                self.write_scalar(Scalar::from_target_usize(len, self), &dest)?;
             }
 
             Ref(_, borrow_kind, place) => {
@@ -297,7 +297,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
                     mir::NullOp::SizeOf => layout.size.bytes(),
                     mir::NullOp::AlignOf => layout.align.abi.bytes(),
                 };
-                self.write_scalar(Scalar::from_machine_usize(val, self), &dest)?;
+                self.write_scalar(Scalar::from_target_usize(val, self), &dest)?;
             }
 
             ShallowInitBox(ref operand, _) => {