make miri compile again

This commit is contained in:
Ralf Jung
2018-07-24 22:20:50 +02:00
committed by Oliver Schneider
parent 53114e3b36
commit e849fa47fb
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -344,7 +344,7 @@ fn call_intrinsic(
ty::layout::Abi::Scalar(_) => Value::Scalar(Scalar::null()),
_ => {
// FIXME(oli-obk): pass TyLayout to alloc_ptr instead of Ty
let ptr = this.alloc_ptr(dest_layout.ty)?;
let ptr = this.alloc_ptr(dest_layout)?;
let ptr = Scalar::Ptr(ptr);
this.memory.write_repeat(ptr, 0, size)?;
Value::ByRef(ptr, dest_layout.align)
+1
View File
@@ -140,6 +140,7 @@ fn abstract_place(&self, place: &mir::Place<'tcx>) -> EvalResult<'tcx, AbsPlace<
mir::Place::Static(ref s) => AbsPlace::Static(s.def_id),
mir::Place::Projection(ref p) =>
AbsPlace::Projection(Box::new(self.abstract_place_projection(&*p)?)),
_ => unimplemented!("validation is not currently maintained"),
})
}