We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8845f0 commit 2489bafCopy full SHA for 2489baf
src/libsyntax/parse/parser.rs
@@ -1600,7 +1600,7 @@ class parser {
1600
1601
fn parse_loop_expr() -> @expr {
1602
let opt_ident;
1603
- if is_ident(self.token) {
+ if is_ident(self.token) && !self.is_any_keyword(copy self.token) {
1604
opt_ident = some(self.parse_ident());
1605
self.expect(token::COLON);
1606
} else {
src/test/run-pass/loop-unsafe.rs
@@ -0,0 +1,8 @@
1
+// Tests that "loop unsafe" isn't misparsed.
2
+
3
+fn main() {
4
+ loop unsafe {
5
+ io::println("Hello world!");
6
+ }
7
+}
8
0 commit comments