From 95bc9ea26df56b29f74583317ab080fdc7b99757 Mon Sep 17 00:00:00 2001 From: Jihyun Yu Date: Sat, 2 Mar 2013 12:57:05 +0900 Subject: Remove REC, change related tests/docs --- src/libsyntax/parse/parser.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/libsyntax/parse/parser.rs') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 6294243d486..444f1201fc3 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -1093,15 +1093,10 @@ pub impl Parser { self.mk_expr(lo, hi, expr_tup(es)) } } else if *self.token == token::LBRACE { - if self.looking_at_record_literal() { - ex = self.parse_record_literal(); - hi = self.span.hi; - } else { - self.bump(); - let blk = self.parse_block_tail(lo, default_blk); - return self.mk_expr(blk.span.lo, blk.span.hi, - expr_block(blk)); - } + self.bump(); + let blk = self.parse_block_tail(lo, default_blk); + return self.mk_expr(blk.span.lo, blk.span.hi, + expr_block(blk)); } else if token::is_bar(*self.token) { return self.parse_lambda_expr(); } else if self.eat_keyword(~"if") { @@ -1223,6 +1218,7 @@ pub impl Parser { self.bump(); let mut fields = ~[]; let mut base = None; + fields.push(self.parse_field(token::COLON)); while *self.token != token::RBRACE { if self.try_parse_obsolete_with() { -- cgit 1.4.1-3-g733a5