diff options
| author | bors <bors@rust-lang.org> | 2014-05-09 04:36:33 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-05-09 04:36:33 -0700 |
| commit | 65205652b8cf15407b720f69c3f90710c7136e62 (patch) | |
| tree | 63a0a5c6c64fedc6997009380a7a81fd45c8c9fa | |
| parent | 52002154c77377cff8a98dd5dc9467a3613caee7 (diff) | |
| parent | a4b7b8df404c9dc32a00602ddc41b11b758f5791 (diff) | |
| download | rust-65205652b8cf15407b720f69c3f90710c7136e62.tar.gz rust-65205652b8cf15407b720f69c3f90710c7136e62.zip | |
auto merge of #14043 : sanxiyn/rust/attr-reference, r=alexcrichton
Attribute grammar in reference manual allowed `#[foo, bar]`, which does not match parser behavior. Also rename nonterminals to match parser code. Fix #13825.
| -rw-r--r-- | src/doc/rust.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/doc/rust.md b/src/doc/rust.md index e4c95538d30..0e5af8626f8 100644 --- a/src/doc/rust.md +++ b/src/doc/rust.md @@ -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_ |
