diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-05-03 18:51:58 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-05-08 17:04:00 -0700 |
| commit | db4573a7760bd2014b2eca2537b6af15a9803e3d (patch) | |
| tree | ad598aad92edd9b68fa52d8635814fcce6d54dca /src/libsyntax/parse | |
| parent | c7522417d48c03a110fa8839428424d6dbae1223 (diff) | |
| download | rust-db4573a7760bd2014b2eca2537b6af15a9803e3d.tar.gz rust-db4573a7760bd2014b2eca2537b6af15a9803e3d.zip | |
librustc: Remove mutable fields from the language.
They're still parsed though, to get through bootstrapping.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 810efd39177..9eb74f9e529 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -45,7 +45,7 @@ use ast::{pat_tup, pat_uniq, pat_wild, private}; use ast::{rem, required}; use ast::{ret_style, return_val, self_ty, shl, shr, stmt, stmt_decl}; use ast::{stmt_expr, stmt_semi, stmt_mac, struct_def, struct_field}; -use ast::{struct_immutable, struct_mutable, struct_variant_kind, subtract}; +use ast::{struct_variant_kind, subtract}; use ast::{sty_box, sty_region, sty_static, sty_uniq, sty_value}; use ast::{token_tree, trait_method, trait_ref, tt_delim, tt_seq, tt_tok}; use ast::{tt_nonterminal, tuple_variant_kind, Ty, ty_, ty_bot, ty_box}; @@ -2528,10 +2528,10 @@ pub impl Parser { fn parse_name_and_ty(&self, pr: visibility, attrs: ~[attribute]) -> @struct_field { - let mut is_mutbl = struct_immutable; let lo = self.span.lo; if self.eat_keyword(&~"mut") { - is_mutbl = struct_mutable; + // Do nothing, for backwards compatibility. + // XXX: Remove after snapshot. } if !is_plain_ident(&*self.token) { self.fatal(~"expected ident"); @@ -2540,7 +2540,7 @@ pub impl Parser { self.expect(&token::COLON); let ty = self.parse_ty(false); @spanned(lo, self.last_span.hi, ast::struct_field_ { - kind: named_field(name, is_mutbl, pr), + kind: named_field(name, pr), id: self.get_id(), ty: ty, attrs: attrs, |
