Puts out burning tinderbox (oops, AST nodes don't have def_ids/anns).

This commit is contained in:
Lindsey Kuper 2011-06-21 14:07:28 -07:00
parent 84005fadbf
commit 26d8eaefa7
2 changed files with 4 additions and 5 deletions

View File

@ -1734,8 +1734,7 @@ fn parse_anon_obj_field(&parser p) -> ast::anon_obj_field {
auto ident = parse_value_ident(p);
expect(p, token::EQ);
auto expr = parse_expr(p);
ret rec(mut=mut, ty=ty, expr=expr, ident=ident, id=p.next_def_id(),
ann=p.get_ann());
ret rec(mut=mut, ty=ty, expr=expr, ident=ident, id=p.get_id());
}
fn parse_method(&parser p) -> @ast::method {

View File

@ -6510,7 +6510,7 @@ fn trans_anon_obj(@block_ctxt bcx, &span sp, &ast::anon_obj anon_obj,
case (some(?fields)) {
additional_fields = fields;
for (ast::anon_obj_field f in fields) {
additional_field_tys += [node_ann_type(ccx, f.ann)];
additional_field_tys += [node_id_type(ccx, f.id)];
additional_field_vals += [trans_expr(bcx, f.expr)];
}
}
@ -6526,7 +6526,7 @@ fn trans_anon_obj(@block_ctxt bcx, &span sp, &ast::anon_obj anon_obj,
// Translating with_obj returns a ValueRef (pointer to a 2-word
// value) wrapped in a result.
with_obj_val = some[result](trans_expr(bcx, e));
with_obj_ty = node_ann_type(ccx, ty::expr_ann(e));
with_obj_ty = ty::expr_ty(ccx.tcx, e);
}
}
// 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,
// and all we have is an ast::anon_obj, so we need to roll our own.
fn anon_obj_field_to_obj_field(&ast::anon_obj_field f) -> ast::obj_field {
ret rec(mut=f.mut, ty=f.ty, ident=f.ident, id=f.id, ann=f.ann);
ret rec(mut=f.mut, ty=f.ty, ident=f.ident, id=f.id);
}
let ast::_obj wrapper_obj = rec(
fields = vec::map(anon_obj_field_to_obj_field, additional_fields),