From fb196e6ef1d9984c29ad38aa9f20798f1514c5e4 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Thu, 1 Sep 2011 16:38:30 +0200 Subject: [PATCH] Make alias analysis properly recognize closures in call position I figured this'd break a few things, but in fact it causes no problems whatsoever. --- src/comp/middle/alias.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/comp/middle/alias.rs b/src/comp/middle/alias.rs index f43ab93d4c1f..f56d2c64d825 100644 --- a/src/comp/middle/alias.rs +++ b/src/comp/middle/alias.rs @@ -181,7 +181,7 @@ fn check_call(cx: &ctx, f: &@ast::expr, args: &[@ast::expr], sc: &scope) } let f_may_close = alt f.node { ast::expr_path(_) { def_is_local(cx.tcx.def_map.get(f.id), true) } - _ { false } // FIXME should be true! + _ { true } }; if f_may_close { let i = 0u;