From 92ef17aaebb28a8fe6579f669a3ee162c931d9dd Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 7 Aug 2012 13:01:15 -0700 Subject: syntax: Fix parsing of inherent traits --- src/libsyntax/parse/parser.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libsyntax/parse/parser.rs') 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 -- cgit 1.4.1-3-g733a5