Skip to content

Commit c2b8f98

Browse files
committed
librustc: Fix drop finalizer not running for newtype structs.
1 parent 868b7c1 commit c2b8f98

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/librustc/middle/trans/base.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2071,6 +2071,7 @@ pub fn trans_tuple_struct(ccx: @CrateContext,
20712071
let bcx = copy_args_to_allocas(fcx, bcx, fn_args, raw_llargs, arg_tys);
20722072
20732073
let repr = adt::represent_type(ccx, tup_ty);
2074+
adt::trans_start_init(bcx, repr, fcx.llretptr.get(), 0);
20742075
20752076
for fields.eachi |i, field| {
20762077
let lldestptr = adt::trans_field_ptr(bcx,

0 commit comments

Comments
 (0)