Skip to content

Commit a9fb88d

Browse files
committed
rm special case for ty_struct from take glue
This is incorrect, as take glue isn't used for moves.
1 parent 8eb28bb commit a9fb88d

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/librustc/middle/trans/glue.rs

-17
Original file line numberDiff line numberDiff line change
@@ -595,23 +595,6 @@ pub fn make_take_glue(bcx: @mut Block, v: ValueRef, t: ty::t) -> @mut Block {
595595
bcx
596596
}
597597
ty::ty_opaque_closure_ptr(_) => bcx,
598-
ty::ty_struct(did, _) => {
599-
let tcx = bcx.tcx();
600-
let bcx = iter_structural_ty(bcx, v, t, take_ty);
601-
602-
match ty::ty_dtor(tcx, did) {
603-
ty::TraitDtor(_, false) => {
604-
// Zero out the struct
605-
unsafe {
606-
let ty = Type::from_ref(llvm::LLVMTypeOf(v));
607-
memzero(&B(bcx), v, ty);
608-
}
609-
610-
}
611-
_ => { }
612-
}
613-
bcx
614-
}
615598
_ if ty::type_is_structural(t) => {
616599
iter_structural_ty(bcx, v, t, take_ty)
617600
}

0 commit comments

Comments
 (0)