Skip to content

Commit 512cfb4

Browse files
committed
Remove a few kludges that worked around issue #913
1 parent c941596 commit 512cfb4

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/comp/middle/alias.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,7 @@ fn check_alt(cx: ctx, input: @ast::expr, arms: [ast::arm], sc: scope,
395395
for pat in a.pats {
396396
for proot in pattern_roots(cx.tcx, root.mut, pat) {
397397
let canon_id = pat_id_map.get(proot.name);
398-
// FIXME I wanted to use a block here, but that hit bug #913
399-
fn match(x: info, canon: node_id) -> bool { x.id == canon }
400-
alt vec::find(bind match(_, canon_id), binding_info) {
398+
alt vec::find({|x| x.id == canon_id}, binding_info) {
401399
some(s) { s.unsafe += unsafe_set(proot.mut); }
402400
none. {
403401
binding_info += [{id: canon_id,

src/comp/middle/trans.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -4091,10 +4091,7 @@ fn trans_rec(bcx: @block_ctxt, fields: [ast::field],
40914091
for tf in ty_fields {
40924092
let dst = GEP_tup_like_1(bcx, t, addr, [0, i]);
40934093
bcx = dst.bcx;
4094-
// FIXME make this again when
4095-
// bug #913 is fixed
4096-
fn test(n: str, f: ast::field) -> bool { str::eq(f.node.ident, n) }
4097-
alt vec::find(bind test(tf.ident, _), fields) {
4094+
alt vec::find({|f| str::eq(f.node.ident, tf.ident)}, fields) {
40984095
some(f) {
40994096
bcx = trans_expr_save_in(bcx, f.node.expr, dst.val, INIT);
41004097
}

0 commit comments

Comments
 (0)