treat native fns as shared closures

This commit is contained in:
Niko Matsakis 2011-12-14 09:21:35 -08:00
parent d32d0f28d5
commit 5a5f33c779

View File

@ -1466,6 +1466,7 @@ fn make_drop_glue(bcx: @block_ctxt, v0: ValueRef, t: ty::t) {
let box_cell = GEPi(bcx, v0, [0, abi::fn_field_box]);
free_ty(bcx, Load(bcx, box_cell), t)
}
ty::ty_native_fn(_, _) |
ty::ty_fn(ast::proto_shared(_), _, _, _, _) {
let box_cell = GEPi(bcx, v0, [0, abi::fn_field_box]);
decr_refcnt_maybe_free(bcx, Load(bcx, box_cell), t)