diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index aaf8533ba2b..b66cb7bb455 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -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 { diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index a3922dee6e2..d6d13bf540c 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -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),