Correct attribute grammar in reference manual
This commit is contained in:
parent
e454851813
commit
a4b7b8df40
@ -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…
Reference in New Issue
Block a user