make miri compile again
This commit is contained in:
parent
53114e3b36
commit
e849fa47fb
@ -344,7 +344,7 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for EvalContext<'a, 'mir, 'tcx, super:
|
||||
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)
|
||||
|
@ -140,6 +140,7 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx> for EvalContext<'a, 'mir, '
|
||||
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"),
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user