Skip to content

Commit a4b7b8d

Browse files
committed
Correct attribute grammar in reference manual
1 parent e454851 commit a4b7b8d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/doc/rust.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1741,10 +1741,10 @@ import public items from their destination, not private items.
17411741
## Attributes
17421742

17431743
~~~~ {.notrust .ebnf .gram}
1744-
attribute : '#' '!' ? '[' attr_list ']' ;
1745-
attr_list : attr [ ',' attr_list ]* ;
1746-
attr : ident [ '=' literal
1747-
| '(' attr_list ')' ] ? ;
1744+
attribute : '#' '!' ? '[' meta_item ']' ;
1745+
meta_item : ident [ '=' literal
1746+
| '(' meta_seq ')' ] ? ;
1747+
meta_seq : meta_item [ ',' meta_seq ]* ;
17481748
~~~~
17491749

17501750
Static entities in Rust — crates, modules and items — may have _attributes_

0 commit comments

Comments
 (0)