Skip to content

Commit 9916e30

Browse files
committed
make miri compile again
1 parent cc3b93c commit 9916e30

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/intrinsic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for EvalContext<'a, 'mir, 'tcx, super:
344344
ty::layout::Abi::Scalar(_) => Value::Scalar(Scalar::null()),
345345
_ => {
346346
// FIXME(oli-obk): pass TyLayout to alloc_ptr instead of Ty
347-
let ptr = this.alloc_ptr(dest_layout.ty)?;
347+
let ptr = this.alloc_ptr(dest_layout)?;
348348
let ptr = Scalar::Ptr(ptr);
349349
this.memory.write_repeat(ptr, 0, size)?;
350350
Value::ByRef(ptr, dest_layout.align)

src/validation.rs

+1
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx> for EvalContext<'a, 'mir, '
140140
mir::Place::Static(ref s) => AbsPlace::Static(s.def_id),
141141
mir::Place::Projection(ref p) =>
142142
AbsPlace::Projection(Box::new(self.abstract_place_projection(&*p)?)),
143+
_ => unimplemented!("validation is not currently maintained"),
143144
})
144145
}
145146

0 commit comments

Comments
 (0)