about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-06-14 11:03:34 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-15 23:30:24 -0700
commit89b0e6e12ba2fb24ec0e6655a1130c16eb8d1745 (patch)
tree842308cfd38935989d625db41ffdd22758f8acdb /src/libsyntax/parse/parser.rs
parent6d8342f5e9f7093694548e761ee7df4f55243f3f (diff)
downloadrust-89b0e6e12ba2fb24ec0e6655a1130c16eb8d1745.tar.gz
rust-89b0e6e12ba2fb24ec0e6655a1130c16eb8d1745.zip
Register new snapshots
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs41
1 files changed, 4 insertions, 37 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index ae3b8587ee5..8b50a6270bc 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -302,7 +302,7 @@ pub struct Parser<'a> {
     pub tokens_consumed: uint,
     pub restriction: restriction,
     pub quote_depth: uint, // not (yet) related to the quasiquoter
-    pub reader: Box<Reader:>,
+    pub reader: Box<Reader>,
     pub interner: Rc<token::IdentInterner>,
     /// The set of seen errors about obsolete syntax. Used to suppress
     /// extra detail when the same error is seen twice
@@ -325,7 +325,8 @@ fn is_plain_ident_or_underscore(t: &token::Token) -> bool {
 }
 
 impl<'a> Parser<'a> {
-    pub fn new(sess: &'a ParseSess, cfg: ast::CrateConfig, mut rdr: Box<Reader:>) -> Parser<'a> {
+    pub fn new(sess: &'a ParseSess, cfg: ast::CrateConfig,
+               mut rdr: Box<Reader>) -> Parser<'a> {
         let tok0 = rdr.next_token();
         let span = tok0.sp;
         let placeholder = TokenAndSpan {
@@ -1232,13 +1233,6 @@ impl<'a> Parser<'a> {
                 })
               }
 
-              #[cfg(stage0)]
-              _ => {
-                  let token_str = p.this_token_to_str();
-                  p.fatal((format!("expected `;` or `\\{` but found `{}`",
-                                   token_str)).as_slice())
-              }
-              #[cfg(not(stage0))]
               _ => {
                   let token_str = p.this_token_to_str();
                   p.fatal((format!("expected `;` or `{{` but found `{}`",
@@ -1645,12 +1639,9 @@ impl<'a> Parser<'a> {
         }
 
         // Next, parse a plus and bounded type parameters, if applicable.
-        //
-        // NOTE(stage0, pcwalton): Remove `token::COLON` after a snapshot.
         let bounds = if mode == LifetimeAndTypesAndBounds {
             let bounds = {
-                if self.eat(&token::BINOP(token::PLUS)) ||
-                        self.eat(&token::COLON) {
+                if self.eat(&token::BINOP(token::PLUS)) {
                     let (_, bounds) = self.parse_ty_param_bounds(false);
                     Some(bounds)
                 } else {
@@ -3208,21 +3199,6 @@ impl<'a> Parser<'a> {
             // consuming more tokens).
             let (bra, ket) = match token::close_delimiter_for(&self.token) {
                 Some(ket) => (self.token.clone(), ket),
-                #[cfg(stage0)]
-                None      => {
-                    // we only expect an ident if we didn't parse one
-                    // above.
-                    let ident_str = if id == token::special_idents::invalid {
-                        "identifier, "
-                    } else {
-                        ""
-                    };
-                    let tok_str = self.this_token_to_str();
-                    self.fatal(format!("expected {}`(` or `\\{`, but found `{}`",
-                                       ident_str,
-                                       tok_str).as_slice())
-                }
-                #[cfg(not(stage0))]
                 None      => {
                     // we only expect an ident if we didn't parse one
                     // above.
@@ -4153,15 +4129,6 @@ impl<'a> Parser<'a> {
                 self.bump();
             }
             token::RBRACE => {}
-            #[cfg(stage0)]
-            _ => {
-                let span = self.span;
-                let token_str = self.this_token_to_str();
-                self.span_fatal(span,
-                                format!("expected `,`, or `\\}` but found `{}`",
-                                        token_str).as_slice())
-            }
-            #[cfg(not(stage0))]
             _ => {
                 let span = self.span;
                 let token_str = self.this_token_to_str();