From 2489baf82ed8d5dd99e2204a9246e08c300e075e Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 16 Aug 2012 15:19:47 -0700 Subject: libsyntax: Fix parsing of "loop unsafe". It was getting misparsed as a label. --- src/libsyntax/parse/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 1f80eac461d..c714fe59b13 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1600,7 +1600,7 @@ class parser { fn parse_loop_expr() -> @expr { let opt_ident; - if is_ident(self.token) { + if is_ident(self.token) && !self.is_any_keyword(copy self.token) { opt_ident = some(self.parse_ident()); self.expect(token::COLON); } else { -- cgit 1.4.1-3-g733a5