diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-22 01:36:41 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-23 04:54:27 +0530 |
| commit | b4e9106a8a476c2b77e2c4cd8717a9bc1b95de52 (patch) | |
| tree | eb7494e5b785d5abb724393c4ade43ed572f9c89 /src | |
| parent | 5b9e87b5711361cb01bf3e066bc53c765f6dc5b9 (diff) | |
| parent | 7ec80fa31c0bcb74fbe5e000015826a210a69034 (diff) | |
| download | rust-b4e9106a8a476c2b77e2c4cd8717a9bc1b95de52.tar.gz rust-b4e9106a8a476c2b77e2c4cd8717a9bc1b95de52.zip | |
Rollup merge of #23590 - FuGangqiang:attr, r=alexcrichton
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/reference.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md index 92573d79217..415ec4e4fbf 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -1982,7 +1982,7 @@ the namespace hierarchy as it normally would. ## Attributes ```{.ebnf .gram} -attribute : "#!" ? '[' meta_item ']' ; +attribute : '#' '!' ? '[' meta_item ']' ; meta_item : ident [ '=' literal | '(' meta_seq ')' ] ? ; meta_seq : meta_item [ ',' meta_seq ] ? ; @@ -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. @@ -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 |
