diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-05-23 19:47:38 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-05-29 19:04:51 -0700 |
| commit | 4e3d4b36dc3a030bb5f152afbfccfd4427830dac (patch) | |
| tree | d87281f9ec48a03d9e7bc66de07be6e80c5ce371 /src/libsyntax/parse | |
| parent | 481d4ca43fde15443120f607a71fc951873532e5 (diff) | |
| download | rust-4e3d4b36dc3a030bb5f152afbfccfd4427830dac.tar.gz rust-4e3d4b36dc3a030bb5f152afbfccfd4427830dac.zip | |
libsyntax: Stop parsing mutable fields
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 1af0cfab273..de93bb3712b 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1157,11 +1157,13 @@ pub impl Parser { // parse ident COLON expr fn parse_field(&self) -> field { let lo = self.span.lo; - let m = self.parse_mutability(); let i = self.parse_ident(); self.expect(&token::COLON); let e = self.parse_expr(); - spanned(lo, e.span.hi, ast::field_ { mutbl: m, ident: i, expr: e }) + spanned(lo, e.span.hi, ast::field_ { + ident: i, + expr: e + }) } fn mk_expr(&self, lo: BytePos, hi: BytePos, node: expr_) -> @expr { @@ -2566,10 +2568,6 @@ pub impl Parser { pr: visibility, attrs: ~[attribute]) -> @struct_field { let lo = self.span.lo; - if self.eat_keyword(keywords::Mut) { - // Do nothing, for backwards compatibility. - // XXX: Remove after snapshot. - } if !is_plain_ident(&*self.token) { self.fatal("expected ident"); } |
