Correct attribute grammar in reference manual

This commit is contained in:
Seo Sanghyeon 2014-05-09 01:45:44 +09:00
parent e454851813
commit a4b7b8df40

View File

@ -1741,10 +1741,10 @@ import public items from their destination, not private items.
## Attributes
~~~~ {.notrust .ebnf .gram}
attribute : '#' '!' ? '[' attr_list ']' ;
attr_list : attr [ ',' attr_list ]* ;
attr : ident [ '=' literal
| '(' attr_list ')' ] ? ;
attribute : '#' '!' ? '[' meta_item ']' ;
meta_item : ident [ '=' literal
| '(' meta_seq ')' ] ? ;
meta_seq : meta_item [ ',' meta_seq ]* ;
~~~~
Static entities in Rust — crates, modules and items — may have _attributes_