Tweak the type allocated for unique pointers
Seems to be more correctish... Issue #409
This commit is contained in:
parent
777a536313
commit
c5877450e6
3 changed files with 5 additions and 5 deletions
|
|
@ -4,7 +4,7 @@ import trans_common::*;
|
|||
import trans_build::*;
|
||||
import trans::{
|
||||
trans_shared_malloc,
|
||||
type_of_or_i8,
|
||||
type_of_inner,
|
||||
size_of,
|
||||
move_val_if_temp,
|
||||
node_id_type,
|
||||
|
|
@ -54,7 +54,9 @@ fn alloc_uniq(cx: @block_ctxt, uniq_ty: ty::t)
|
|||
bcx = r.bcx;
|
||||
let llsz = r.val;
|
||||
|
||||
let llptrty = T_ptr(type_of_or_i8(bcx, contents_ty));
|
||||
let ccx = bcx_ccx(bcx);
|
||||
check non_ty_var(ccx, contents_ty);
|
||||
let llptrty = T_ptr(type_of_inner(ccx, bcx.sp, contents_ty));
|
||||
|
||||
r = trans_shared_malloc(bcx, llptrty, llsz);
|
||||
bcx = r.bcx;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue