From 345b5a47bdf4f3ebdcc61c9f3f49a86cf357d025 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Mon, 26 Sep 2011 14:01:41 +0200 Subject: [PATCH] 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. --- src/comp/middle/tstate/collect_locals.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/comp/middle/tstate/collect_locals.rs b/src/comp/middle/tstate/collect_locals.rs index aebae2777fb8..75d9fbef72d3 100644 --- a/src/comp/middle/tstate/collect_locals.rs +++ b/src/comp/middle/tstate/collect_locals.rs @@ -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),