Skip to content

Commit 26d8eae

Browse files
committed
Puts out burning tinderbox (oops, AST nodes don't have def_ids/anns).
1 parent 84005fa commit 26d8eae

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/comp/front/parser.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,8 +1734,7 @@ fn parse_anon_obj_field(&parser p) -> ast::anon_obj_field {
17341734
auto ident = parse_value_ident(p);
17351735
expect(p, token::EQ);
17361736
auto expr = parse_expr(p);
1737-
ret rec(mut=mut, ty=ty, expr=expr, ident=ident, id=p.next_def_id(),
1738-
ann=p.get_ann());
1737+
ret rec(mut=mut, ty=ty, expr=expr, ident=ident, id=p.get_id());
17391738
}
17401739

17411740
fn parse_method(&parser p) -> @ast::method {

src/comp/middle/trans.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6510,7 +6510,7 @@ fn trans_anon_obj(@block_ctxt bcx, &span sp, &ast::anon_obj anon_obj,
65106510
case (some(?fields)) {
65116511
additional_fields = fields;
65126512
for (ast::anon_obj_field f in fields) {
6513-
additional_field_tys += [node_ann_type(ccx, f.ann)];
6513+
additional_field_tys += [node_id_type(ccx, f.id)];
65146514
additional_field_vals += [trans_expr(bcx, f.expr)];
65156515
}
65166516
}
@@ -6526,7 +6526,7 @@ fn trans_anon_obj(@block_ctxt bcx, &span sp, &ast::anon_obj anon_obj,
65266526
// Translating with_obj returns a ValueRef (pointer to a 2-word
65276527
// value) wrapped in a result.
65286528
with_obj_val = some[result](trans_expr(bcx, e));
6529-
with_obj_ty = node_ann_type(ccx, ty::expr_ann(e));
6529+
with_obj_ty = ty::expr_ty(ccx.tcx, e);
65306530
}
65316531
}
65326532
// FIXME (part of issue #538): much of the following code is copypasta
@@ -6552,7 +6552,7 @@ fn trans_anon_obj(@block_ctxt bcx, &span sp, &ast::anon_obj anon_obj,
65526552
// and all we have is an ast::anon_obj, so we need to roll our own.
65536553

65546554
fn anon_obj_field_to_obj_field(&ast::anon_obj_field f) -> ast::obj_field {
6555-
ret rec(mut=f.mut, ty=f.ty, ident=f.ident, id=f.id, ann=f.ann);
6555+
ret rec(mut=f.mut, ty=f.ty, ident=f.ident, id=f.id);
65566556
}
65576557
let ast::_obj wrapper_obj = rec(
65586558
fields = vec::map(anon_obj_field_to_obj_field, additional_fields),

0 commit comments

Comments
 (0)