Do not force_allocate Box destination.
This commit is contained in:
parent
197e89bbb0
commit
abf3e048ad
1 changed files with 2 additions and 7 deletions
|
|
@ -635,13 +635,8 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
|
|||
}
|
||||
|
||||
Box(ty) => {
|
||||
// FIXME(solson)
|
||||
let dest = self.force_allocation(dest)?.to_ptr();
|
||||
|
||||
let size = self.type_size(ty);
|
||||
let align = self.type_align(ty);
|
||||
let ptr = self.memory.allocate(size, align)?;
|
||||
self.memory.write_ptr(dest, ptr)?;
|
||||
let ptr = self.alloc_ptr(ty)?;
|
||||
self.write_primval(dest, PrimVal::Ptr(ptr))?;
|
||||
}
|
||||
|
||||
Cast(kind, ref operand, cast_ty) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue