Skip to content

Commit 5a5f33c

Browse files
committed
treat native fns as shared closures
1 parent d32d0f2 commit 5a5f33c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/comp/middle/trans.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,6 +1466,7 @@ fn make_drop_glue(bcx: @block_ctxt, v0: ValueRef, t: ty::t) {
14661466
let box_cell = GEPi(bcx, v0, [0, abi::fn_field_box]);
14671467
free_ty(bcx, Load(bcx, box_cell), t)
14681468
}
1469+
ty::ty_native_fn(_, _) |
14691470
ty::ty_fn(ast::proto_shared(_), _, _, _, _) {
14701471
let box_cell = GEPi(bcx, v0, [0, abi::fn_field_box]);
14711472
decr_refcnt_maybe_free(bcx, Load(bcx, box_cell), t)

0 commit comments

Comments
 (0)