Skip to content

Commit 345b5a4

Browse files
committed
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.
1 parent 37cf7b9 commit 345b5a4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/comp/middle/tstate/collect_locals.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,11 @@ fn mk_fn_info(ccx: crate_ctxt, f: _fn, tp: [ty_param], f_sp: span,
138138
{constrs: res_map,
139139

140140
// add 2 to account for the i_return and i_diverge constraints
141+
// FIXME the 1u here is a kludge to make bug #913's impact somewhat
142+
// smaller. it should be removed once the bug is really fixed
141143
num_constraints:
142144
vec::len(*cx.cs) + vec::len(f.decl.constraints) +
143-
vec::len(f.decl.inputs) + 2u,
145+
vec::len(f.decl.inputs) + 2u + 1u,
144146
cf: f.decl.cf,
145147
i_return: ninit(id, name),
146148
i_diverge: ninit(diverges_id, diverges_name),

0 commit comments

Comments
 (0)