about summary refs log tree commit diff
path: root/src/comp
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2011-09-28 12:59:44 +0200
committerMarijn Haverbeke <marijnh@gmail.com>2011-09-28 12:59:44 +0200
commit512cfb4b8387a6919c06d7e01401c53c6ab7dd1c (patch)
treed41658236a4efd17574e64af75c2cfacddd88a64 /src/comp
parentc94159652aa9c95fa0f5f59f093856d50bdab7bf (diff)
downloadrust-512cfb4b8387a6919c06d7e01401c53c6ab7dd1c.tar.gz
rust-512cfb4b8387a6919c06d7e01401c53c6ab7dd1c.zip
Remove a few kludges that worked around issue #913
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/middle/alias.rs4
-rw-r--r--src/comp/middle/trans.rs5
2 files changed, 2 insertions, 7 deletions
diff --git a/src/comp/middle/alias.rs b/src/comp/middle/alias.rs
index 105a7a85626..3a71f361b4c 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 f67c07dff55..3f028a2c6cf 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);
           }