about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 74370d005ce..0b326c14158 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2818,22 +2818,13 @@ impl parser {
     }
 
     fn parse_class_item() -> class_contents {
+
+        if self.try_parse_obsolete_priv_section() {
+            return members(~[]);
+        }
+
         if self.eat_keyword(~"priv") {
-            // XXX: Remove after snapshot.
-            match self.token {
-                token::LBRACE => {
-                    self.bump();
-                    let mut results = ~[];
-                    while self.token != token::RBRACE {
-                        vec::push(results,
-                                  self.parse_single_class_item(private));
-                    }
-                    self.bump();
-                    return members(results);
-                }
-                _ =>
-                   return members(~[self.parse_single_class_item(private)])
-            }
+            return members(~[self.parse_single_class_item(private)])
         }
 
         if self.eat_keyword(~"pub") {