From c2b8f98917597dd719ad93b25dcf000aeaa6d5d0 Mon Sep 17 00:00:00 2001 From: Luqman Aden Date: Mon, 29 Apr 2013 19:48:28 -0700 Subject: [PATCH] librustc: Fix drop finalizer not running for newtype structs. --- src/librustc/middle/trans/base.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librustc/middle/trans/base.rs b/src/librustc/middle/trans/base.rs index efa10dfc2aa..892a8da367c 100644 --- a/src/librustc/middle/trans/base.rs +++ b/src/librustc/middle/trans/base.rs @@ -2071,6 +2071,7 @@ pub fn trans_tuple_struct(ccx: @CrateContext, let bcx = copy_args_to_allocas(fcx, bcx, fn_args, raw_llargs, arg_tys); let repr = adt::represent_type(ccx, tup_ty); + adt::trans_start_init(bcx, repr, fcx.llretptr.get(), 0); for fields.eachi |i, field| { let lldestptr = adt::trans_field_ptr(bcx,