about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-05-09 04:36:33 -0700
committerbors <bors@rust-lang.org>2014-05-09 04:36:33 -0700
commit65205652b8cf15407b720f69c3f90710c7136e62 (patch)
tree63a0a5c6c64fedc6997009380a7a81fd45c8c9fa
parent52002154c77377cff8a98dd5dc9467a3613caee7 (diff)
parenta4b7b8df404c9dc32a00602ddc41b11b758f5791 (diff)
downloadrust-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.md8
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 &mdash; crates, modules and items &mdash; may have _attributes_