Skip to content

Commit

Permalink
Remove a few kludges that worked around issue #913
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Sep 28, 2011
1 parent c941596 commit 512cfb4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/comp/middle/alias.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 1 addition & 4 deletions src/comp/middle/trans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 512cfb4

Please sign in to comment.