Skip to content

Commit 61d8a4e

Browse files
committed
simplify code
1 parent 773f6ae commit 61d8a4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shims/intrinsics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
306306
match dest.layout.abi {
307307
layout::Abi::Scalar(ref s) => {
308308
let x = Scalar::from_int(0, s.value.size(this));
309-
this.write_immediate(Immediate::Scalar(x.into()), dest)?;
309+
this.write_scalar(x, dest)?;
310310
}
311311
layout::Abi::ScalarPair(ref s1, ref s2) => {
312312
let x = Scalar::from_int(0, s1.value.size(this));

0 commit comments

Comments
 (0)