From 512cfb4b8387a6919c06d7e01401c53c6ab7dd1c Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Wed, 28 Sep 2011 12:59:44 +0200 Subject: [PATCH] Remove a few kludges that worked around issue #913 --- src/comp/middle/alias.rs | 4 +--- src/comp/middle/trans.rs | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/comp/middle/alias.rs b/src/comp/middle/alias.rs index 105a7a85626b..3a71f361b4c3 100644 --- a/src/comp/middle/alias.rs +++ b/src/comp/middle/alias.rs @@ -395,9 +395,7 @@ fn check_alt(cx: ctx, input: @ast::expr, arms: [ast::arm], sc: scope, for pat in a.pats { for proot in pattern_roots(cx.tcx, root.mut, pat) { let canon_id = pat_id_map.get(proot.name); - // FIXME I wanted to use a block here, but that hit bug #913 - fn match(x: info, canon: node_id) -> bool { x.id == canon } - alt vec::find(bind match(_, canon_id), binding_info) { + alt vec::find({|x| x.id == canon_id}, binding_info) { some(s) { s.unsafe += unsafe_set(proot.mut); } none. { binding_info += [{id: canon_id, diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index f67c07dff551..3f028a2c6cf1 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -4091,10 +4091,7 @@ fn trans_rec(bcx: @block_ctxt, fields: [ast::field], for tf in ty_fields { let dst = GEP_tup_like_1(bcx, t, addr, [0, i]); bcx = dst.bcx; - // FIXME make this again when - // bug #913 is fixed - fn test(n: str, f: ast::field) -> bool { str::eq(f.node.ident, n) } - alt vec::find(bind test(tf.ident, _), fields) { + alt vec::find({|f| str::eq(f.node.ident, tf.ident)}, fields) { some(f) { bcx = trans_expr_save_in(bcx, f.node.expr, dst.val, INIT); }