Correct attribute grammar in reference manual
This commit is contained in:
parent
e454851813
commit
a4b7b8df40
1 changed files with 4 additions and 4 deletions
|
|
@ -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_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue