Skip to content

Commit b17dc4a

Browse files
committed
auto merge of #9751 : thestinger/rust/immediate, r=alexcrichton
This is incorrect, as take glue isn't used for moves.
2 parents 8eb28bb + f56cf16 commit b17dc4a

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/librustc/middle/trans/glue.rs

-18
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,6 @@ pub fn trans_struct_drop_flag(bcx: @mut Block, t: ty::t, v0: ValueRef, dtor_did:
423423
bcx = drop_ty(bcx, llfld_a, fld.mt.ty);
424424
}
425425

426-
Store(bcx, C_u8(0), drop_flag);
427426
bcx
428427
}
429428
}
@@ -595,23 +594,6 @@ pub fn make_take_glue(bcx: @mut Block, v: ValueRef, t: ty::t) -> @mut Block {
595594
bcx
596595
}
597596
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-
}
615597
_ if ty::type_is_structural(t) => {
616598
iter_structural_ty(bcx, v, t, take_ty)
617599
}

0 commit comments

Comments
 (0)