about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-08-07 13:01:15 -0700
committerBrian Anderson <banderson@mozilla.com>2012-08-07 13:01:22 -0700
commit92ef17aaebb28a8fe6579f669a3ee162c931d9dd (patch)
tree7cc308557c4ae5d86b834e8a3a41adc0ab7dbbe3 /src/libsyntax
parent2772b2e5c7f85e230bcae13c49eb1386afc6cd0e (diff)
downloadrust-92ef17aaebb28a8fe6579f669a3ee162c931d9dd.tar.gz
rust-92ef17aaebb28a8fe6579f669a3ee162c931d9dd.zip
syntax: Fix parsing of inherent traits
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/parse/parser.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index c675af6803c..7eb96cbeb59 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2436,7 +2436,8 @@ class parser {
                 !self.token_is_keyword(~"of", self.look_ahead(1)) &&
                 !self.token_is_keyword(~"for", self.look_ahead(1)) &&
                 self.look_ahead(1) != token::BINOP(token::SLASH) &&
-                self.look_ahead(1) != token::LT {
+                (self.look_ahead(1) != token::LT
+                 || (self.look_ahead(1) == token::LT && tps.is_not_empty())) {
 
             // This is a new-style impl declaration.
             ident = @~"__extensions__";     // XXX: clownshoes