Skip to content

Commit

Permalink
add lifetime for while and for expression
Browse files Browse the repository at this point in the history
  • Loading branch information
FuGangqiang committed Mar 21, 2015
1 parent c175b35 commit bc9d9f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc/reference.md
Expand Up @@ -3158,7 +3158,7 @@ ten_times(|j| println!("hello, {}", j));
### While loops

```{.ebnf .gram}
while_expr : "while" no_struct_literal_expr '{' block '}' ;
while_expr : [ lifetime ':' ] "while" no_struct_literal_expr '{' block '}' ;
```

A `while` loop begins by evaluating the boolean loop conditional expression.
Expand Down Expand Up @@ -3223,7 +3223,7 @@ A `continue` expression is only permitted in the body of a loop.
### For expressions

```{.ebnf .gram}
for_expr : "for" pat "in" no_struct_literal_expr '{' block '}' ;
for_expr : [ lifetime ':' ] "for" pat "in" no_struct_literal_expr '{' block '}' ;
```

A `for` expression is a syntactic construct for looping over elements provided
Expand Down

0 comments on commit bc9d9f2

Please sign in to comment.