about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-07-11 12:57:05 -0700
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2017-07-28 15:46:26 +0200
commit09a5d319ab8fbfd43530289bfff3899f9035e37f (patch)
tree663406df0155f3a95cbdc573aefb7b7cc7b5c5e5 /src/libsyntax/parse
parent93172045c817ffa998d5e28a0899f33edf889f62 (diff)
downloadrust-09a5d319ab8fbfd43530289bfff3899f9035e37f.tar.gz
rust-09a5d319ab8fbfd43530289bfff3899f9035e37f.zip
Remove support for `gen arg`
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 6b825a9d401..b7ae025db5f 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2146,12 +2146,6 @@ impl<'a> Parser<'a> {
                     assert!(self.eat_keyword(keywords::Catch));
                     return self.parse_catch_expr(lo, attrs);
                 }
-                if self.is_gen_arg() {
-                    assert!(self.eat_keyword(keywords::Gen));
-                    assert!(self.eat_keyword(keywords::Arg));
-                    let hi = self.prev_span;
-                    return Ok(self.mk_expr(lo.to(hi), ExprKind::ImplArg, attrs));
-                }
                 if self.eat_keyword(keywords::Return) {
                     if self.token.can_begin_expr() {
                         let e = self.parse_expr()?;
@@ -3710,11 +3704,6 @@ impl<'a> Parser<'a> {
         self.look_ahead(1, |t| t.is_ident() && !t.is_reserved_ident())
     }
 
-    fn is_gen_arg(&self) -> bool {
-        self.token.is_keyword(keywords::Gen) &&
-        self.look_ahead(1, |t| t.is_keyword(keywords::Arg))
-    }
-
     fn is_defaultness(&self) -> bool {
         // `pub` is included for better error messages
         self.token.is_keyword(keywords::Default) &&
@@ -3818,8 +3807,7 @@ impl<'a> Parser<'a> {
         // Starts like a simple path, but not a union item.
         } else if self.token.is_path_start() &&
                   !self.token.is_qpath_start() &&
-                  !self.is_union_item() &&
-                  !self.is_gen_arg() {
+                  !self.is_union_item() {
             let pth = self.parse_path(PathStyle::Expr)?;
 
             if !self.eat(&token::Not) {