Remove a few kludges that worked around issue #913
This commit is contained in:
parent
c94159652a
commit
512cfb4b83
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue