Skip to content

Commit b4e9106

Browse files
committed
Rollup merge of #23590 - FuGangqiang:attr, r=alexcrichton
2 parents 5b9e87b + 7ec80fa commit b4e9106

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/doc/reference.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1982,7 +1982,7 @@ the namespace hierarchy as it normally would.
19821982
## Attributes
19831983

19841984
```{.ebnf .gram}
1985-
attribute : "#!" ? '[' meta_item ']' ;
1985+
attribute : '#' '!' ? '[' meta_item ']' ;
19861986
meta_item : ident [ '=' literal
19871987
| '(' meta_seq ')' ] ? ;
19881988
meta_seq : meta_item [ ',' meta_seq ] ? ;
@@ -3158,7 +3158,7 @@ ten_times(|j| println!("hello, {}", j));
31583158
### While loops
31593159

31603160
```{.ebnf .gram}
3161-
while_expr : "while" no_struct_literal_expr '{' block '}' ;
3161+
while_expr : [ lifetime ':' ] "while" no_struct_literal_expr '{' block '}' ;
31623162
```
31633163

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

32253225
```{.ebnf .gram}
3226-
for_expr : "for" pat "in" no_struct_literal_expr '{' block '}' ;
3226+
for_expr : [ lifetime ':' ] "for" pat "in" no_struct_literal_expr '{' block '}' ;
32273227
```
32283228

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

0 commit comments

Comments
 (0)