1
Fork 0

auto merge of #9751 : thestinger/rust/immediate, r=alexcrichton

This is incorrect, as take glue isn't used for moves.
This commit is contained in:
bors 2013-10-07 16:56:36 -07:00
commit b17dc4a946

View file

@ -423,7 +423,6 @@ pub fn trans_struct_drop_flag(bcx: @mut Block, t: ty::t, v0: ValueRef, dtor_did:
bcx = drop_ty(bcx, llfld_a, fld.mt.ty);
}
Store(bcx, C_u8(0), drop_flag);
bcx
}
}
@ -595,23 +594,6 @@ pub fn make_take_glue(bcx: @mut Block, v: ValueRef, t: ty::t) -> @mut Block {
bcx
}
ty::ty_opaque_closure_ptr(_) => bcx,
ty::ty_struct(did, _) => {
let tcx = bcx.tcx();
let bcx = iter_structural_ty(bcx, v, t, take_ty);
match ty::ty_dtor(tcx, did) {
ty::TraitDtor(_, false) => {
// Zero out the struct
unsafe {
let ty = Type::from_ref(llvm::LLVMTypeOf(v));
memzero(&B(bcx), v, ty);
}
}
_ => { }
}
bcx
}
_ if ty::type_is_structural(t) => {
iter_structural_ty(bcx, v, t, take_ty)
}