1
Fork 0

rm special case for ty_struct from take glue

This is incorrect, as take glue isn't used for moves.
This commit is contained in:
Daniel Micay 2013-10-07 17:18:10 -04:00
parent 8eb28bb7dc
commit a9fb88d4f8

View file

@ -595,23 +595,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)
}