Skip to content

Commit aa3d58c

Browse files
committed
restore old buggy behavior where n_obj_params is always 0 for fns
1 parent 1e3259e commit aa3d58c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/comp/middle/trans_closure.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,15 @@ fn store_environment(
190190
ty::closure_shared. | ty::closure_send. {
191191
let bound_tydesc = GEPi(bcx, closure, [0, abi::closure_elt_tydesc]);
192192
let ti = none;
193-
let tps = tps_fn(vec::len(lltydescs));
193+
194+
// NDM I believe this is the correct value,
195+
// but using it exposes bugs and limitations
196+
// in the shape code. Therefore, I am using
197+
// tps_normal, which is what we used before.
198+
//
199+
// let tps = tps_fn(vec::len(lltydescs));
200+
201+
let tps = tps_normal;
194202
let {result:closure_td, _} =
195203
trans::get_tydesc(bcx, closure_ty, true, tps, ti);
196204
trans::lazily_emit_tydesc_glue(bcx, abi::tydesc_field_drop_glue, ti);

0 commit comments

Comments
 (0)