From a9fb88d4f8c44daadce81fbd009ff4676a38d5e9 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Mon, 7 Oct 2013 17:18:10 -0400 Subject: [PATCH] rm special case for ty_struct from take glue This is incorrect, as take glue isn't used for moves. --- src/librustc/middle/trans/glue.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/librustc/middle/trans/glue.rs b/src/librustc/middle/trans/glue.rs index d420514e84f..eafbb0e9d01 100644 --- a/src/librustc/middle/trans/glue.rs +++ b/src/librustc/middle/trans/glue.rs @@ -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) }