From aa3d58c8c0a2e52b2893328a8d1940e5fbd41303 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Thu, 15 Dec 2011 13:20:43 -0800 Subject: [PATCH] restore old buggy behavior where n_obj_params is always 0 for fns --- src/comp/middle/trans_closure.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/comp/middle/trans_closure.rs b/src/comp/middle/trans_closure.rs index 1ee5a9ede676..039709db8d67 100644 --- a/src/comp/middle/trans_closure.rs +++ b/src/comp/middle/trans_closure.rs @@ -190,7 +190,15 @@ fn store_environment( ty::closure_shared. | ty::closure_send. { let bound_tydesc = GEPi(bcx, closure, [0, abi::closure_elt_tydesc]); let ti = none; - let tps = tps_fn(vec::len(lltydescs)); + + // NDM I believe this is the correct value, + // but using it exposes bugs and limitations + // in the shape code. Therefore, I am using + // tps_normal, which is what we used before. + // + // let tps = tps_fn(vec::len(lltydescs)); + + let tps = tps_normal; let {result:closure_td, _} = trans::get_tydesc(bcx, closure_ty, true, tps, ti); trans::lazily_emit_tydesc_glue(bcx, abi::tydesc_field_drop_glue, ti);