Add a workaround hack for issue #913

I can't figure out what the real cause of this bug is, but I want
to be able to use blocks inside loops again.
This commit is contained in:
Marijn Haverbeke 2011-09-26 14:01:41 +02:00
parent 37cf7b92c8
commit 345b5a47bd

View file

@ -138,9 +138,11 @@ fn mk_fn_info(ccx: crate_ctxt, f: _fn, tp: [ty_param], f_sp: span,
{constrs: res_map,
// add 2 to account for the i_return and i_diverge constraints
// FIXME the 1u here is a kludge to make bug #913's impact somewhat
// smaller. it should be removed once the bug is really fixed
num_constraints:
vec::len(*cx.cs) + vec::len(f.decl.constraints) +
vec::len(f.decl.inputs) + 2u,
vec::len(f.decl.inputs) + 2u + 1u,
cf: f.decl.cf,
i_return: ninit(id, name),
i_diverge: ninit(diverges_id, diverges_name),