summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2014-02-01 01:46:30 +1100
committerAlex Crichton <alex@alexcrichton.com>2014-01-31 21:43:09 -0800
commita9f73b5e3d947c3b8ef8c3a8fbd30823ba099886 (patch)
tree195a3188274e53ecb771dbcea7e6697fb21648af /src/libsyntax/parse/parser.rs
parent6c52e72214fbcebee4a216aefa8dea3ec3cacbdc (diff)
downloadrust-a9f73b5e3d947c3b8ef8c3a8fbd30823ba099886.tar.gz
rust-a9f73b5e3d947c3b8ef8c3a8fbd30823ba099886.zip
Remove the obsolete handler for `impl A;`.
This is has been obsolete for quite a while now (including a release),
so removing the special handling seems fine. (The error message is quite
good still anyway.)

Fixes #9580.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 04a984ba95d..642624adfb2 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3926,21 +3926,15 @@ impl Parser {
         };
 
         let mut meths = ~[];
-        let inner_attrs = if self.eat(&token::SEMI) {
-            self.obsolete(self.last_span, ObsoleteEmptyImpl);
-            None
-        } else {
-            self.expect(&token::LBRACE);
-            let (inner_attrs, next) = self.parse_inner_attrs_and_next();
-            let mut method_attrs = Some(next);
-            while !self.eat(&token::RBRACE) {
-                meths.push(self.parse_method(method_attrs));
-                method_attrs = None;
-            }
-            Some(inner_attrs)
-        };
+        self.expect(&token::LBRACE);
+        let (inner_attrs, next) = self.parse_inner_attrs_and_next();
+        let mut method_attrs = Some(next);
+        while !self.eat(&token::RBRACE) {
+            meths.push(self.parse_method(method_attrs));
+            method_attrs = None;
+        }
 
-        (ident, ItemImpl(generics, opt_trait, ty, meths), inner_attrs)
+        (ident, ItemImpl(generics, opt_trait, ty, meths), Some(inner_attrs))
     }
 
     // parse a::B<~str,int>