Skip to content

Commit

Permalink
Add a workaround hack for issue #913
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
marijnh committed Sep 26, 2011
1 parent 37cf7b9 commit 345b5a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/comp/middle/tstate/collect_locals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 345b5a4

Please sign in to comment.