diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 267bbda9b213e..747ca07bee5fc 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -149,8 +149,7 @@ class parser { fn get_id() -> node_id { next_node_id(self.sess) } fn parse_ty_fn(purity: ast::purity) -> ty_ { - let proto = if self.eat_keyword("native") || - self.eat_keyword("extern") { + let proto = if self.eat_keyword("extern") { self.expect_keyword("fn"); ast::proto_bare } else { @@ -433,8 +432,7 @@ class parser { self.parse_ty_fn(ast::unsafe_fn) } else if self.is_keyword("fn") { self.parse_ty_fn(ast::impure_fn) - } else if self.eat_keyword("native") || - self.eat_keyword("extern") { + } else if self.eat_keyword("extern") { self.expect_keyword("fn"); ty_fn(proto_bare, self.parse_ty_fn_decl(ast::impure_fn)) } else if self.token == token::MOD_SEP || is_ident(self.token) { @@ -2457,13 +2455,8 @@ class parser { } else { self.parse_item_foreign_mod() } - } else if self.eat_keyword("crust") { - self.expect_keyword("fn"); - self.parse_item_fn(extern_fn) } else if self.eat_keyword("mod") { self.parse_item_mod() - } else if self.eat_keyword("native") { - self.parse_item_foreign_mod() } else if self.eat_keyword("type") { self.parse_item_type() } else if self.eat_keyword("enum") { diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index a2bd503ffca8e..4c573b45a1f22 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -293,14 +293,14 @@ fn restricted_keyword_table() -> hashmap { "alt", "assert", "break", - "check", "claim", "class", "const", "cont", "copy", "crust", + "check", "claim", "class", "const", "cont", "copy", "do", "drop", "else", "enum", "export", "extern", "fail", "false", "fn", "for", "if", "iface", "impl", "import", "let", "log", "loop", "mod", "mut", - "native", "new", + "new", "pure", "ret", "true", "trait", "type", "unchecked", "unsafe",