about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2015-09-11 10:09:22 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2015-09-11 10:09:22 +0300
commit9f1f4c16aa8d6d76f5ead50bfd9eeb1329dfe56b (patch)
tree3645d1a68aae74b02eb093122430de805c92e327 /src/libsyntax/parse
parent5f9f0b7cc34141a661822e67a3f05beef27f20dd (diff)
downloadrust-9f1f4c16aa8d6d76f5ead50bfd9eeb1329dfe56b.tar.gz
rust-9f1f4c16aa8d6d76f5ead50bfd9eeb1329dfe56b.zip
Remove some remains of virtual structs from the parser
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs10
-rw-r--r--src/libsyntax/parse/token.rs12
2 files changed, 6 insertions, 16 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 7ce936ed165..56641a9ba27 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -4692,11 +4692,6 @@ impl<'a> Parser<'a> {
         let class_name = try!(self.parse_ident());
         let mut generics = try!(self.parse_generics());
 
-        if try!(self.eat(&token::Colon) ){
-            let ty = try!(self.parse_ty_sum());
-            self.span_err(ty.span, "`virtual` structs have been removed from the language");
-        }
-
         // There is a special case worth noting here, as reported in issue #17904.
         // If we are parsing a tuple struct it is the case that the where clause
         // should follow the field list. Like so:
@@ -5383,11 +5378,6 @@ impl<'a> Parser<'a> {
             try!(self.expect_one_of(&[], &[]));
         }
 
-        if try!(self.eat_keyword_noexpect(keywords::Virtual) ){
-            let span = self.span;
-            self.span_err(span, "`virtual` structs have been removed from the language");
-        }
-
         if try!(self.eat_keyword(keywords::Static) ){
             // STATIC ITEM
             let m = if try!(self.eat_keyword(keywords::Mut)) {MutMutable} else {MutImmutable};
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index ca92a37d8c3..a392872f753 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -575,13 +575,13 @@ declare_special_idents_and_keywords! {
         (36,                         Type,       "type");
         (37,                         Unsafe,     "unsafe");
         (38,                         Use,        "use");
-        (39,                         Virtual,    "virtual");
-        (40,                         While,      "while");
-        (41,                         Continue,   "continue");
-        (42,                         Box,        "box");
-        (43,                         Const,      "const");
-        (44,                         Where,      "where");
+        (39,                         While,      "while");
+        (40,                         Continue,   "continue");
+        (41,                         Box,        "box");
+        (42,                         Const,      "const");
+        (43,                         Where,      "where");
         'reserved:
+        (44,                         Virtual,    "virtual");
         (45,                         Proc,       "proc");
         (46,                         Alignof,    "alignof");
         (47,                         Become,     "become");