Permalink
Browse files

Stop parsing `iface`.

  • Loading branch information...
lkuper committed Aug 17, 2012
1 parent 0ace896 commit eb834fdb81930c676010a184db1eda9a622edc44
Showing with 3 additions and 11 deletions.
  1. +0 −6 src/libsyntax/parse/parser.rs
  2. +1 −1 src/libsyntax/parse/token.rs
  3. +2 −4 src/test/compile-fail/trait-keyword.rs
@@ -3185,12 +3185,6 @@ struct parser {
return iovi_item(self.mk_item(lo, self.last_span.hi, ident, item_,
visibility,
maybe_append(attrs, extra_attrs)));
} else if items_allowed && self.eat_keyword(~"iface") {
self.warn(~"`iface` is deprecated; use `trait`");
let (ident, item_, extra_attrs) = self.parse_item_trait();
return iovi_item(self.mk_item(lo, self.last_span.hi, ident, item_,
visibility,
maybe_append(attrs, extra_attrs)));
} else if items_allowed && self.eat_keyword(~"trait") {
let (ident, item_, extra_attrs) = self.parse_item_trait();
return iovi_item(self.mk_item(lo, self.last_span.hi, ident, item_,
@@ -339,7 +339,7 @@ fn restricted_keyword_table() -> hashmap<~str, ()> {
~"do", ~"drop",
~"else", ~"enum", ~"export", ~"extern",
~"fail", ~"false", ~"fn", ~"for",
~"if", ~"iface", ~"impl", ~"import",
~"if", ~"impl", ~"import",
~"let", ~"log", ~"loop",
~"match", ~"mod", ~"module", ~"move", ~"mut",
~"new",
@@ -1,5 +1,3 @@
iface foo { } //~ WARN `iface` is deprecated; use `trait`
iface foo { } //~ ERROR iface
fn main() {
x //~ ERROR unresolved name: x
}
fn main() {}

0 comments on commit eb834fd

Please sign in to comment.