From 7235f3cee2fd7ceaf697232cd2a2c3b9ceba50ba Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Sat, 21 Apr 2012 13:42:54 -0700 Subject: syntax: Eliminate 'mutable' keyword. Closes #2254 --- src/librustsyntax/parse/parser.rs | 2 +- src/librustsyntax/parse/token.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/librustsyntax') diff --git a/src/librustsyntax/parse/parser.rs b/src/librustsyntax/parse/parser.rs index 4131d3eca96..46ccb09b220 100644 --- a/src/librustsyntax/parse/parser.rs +++ b/src/librustsyntax/parse/parser.rs @@ -1484,7 +1484,7 @@ fn parse_let(p: parser) -> @ast::decl { fn parse_instance_var(p:parser, pr: ast::privacy) -> @ast::class_member { let mut is_mutbl = ast::class_immutable; let lo = p.span.lo; - if eat_word(p, "mut") || eat_word(p, "mutable") { + if eat_word(p, "mut") { is_mutbl = ast::class_mutable; } if !is_plain_ident(p.token) { diff --git a/src/librustsyntax/parse/token.rs b/src/librustsyntax/parse/token.rs index f60e2f26381..9413607aaf1 100644 --- a/src/librustsyntax/parse/token.rs +++ b/src/librustsyntax/parse/token.rs @@ -260,7 +260,7 @@ fn bad_expr_word_table() -> hashmap { "class", "const", "cont", "copy", "crust", "do", "else", "enum", "export", "fail", "fn", "for", "if", "iface", "impl", "import", "let", "log", "loop", "mod", - "mut", "mutable", "native", "new", "pure", "resource", + "mut", "native", "new", "pure", "resource", "ret", "trait", "type", "unchecked", "unsafe", "while"]; for keys.each {|word| words.insert(word, ()); -- cgit 1.4.1-3-g733a5