]> git.lizzy.rs Git - rust.git/blobdiff - doc/rust.md
auto merge of #8585 : jankobler/rust/extract-grammar-01, r=catamorphism
[rust.git] / doc / rust.md
index 4cd9dc3a1162d445865bc87eb311a82984b619d7..16927d0de7a4a48c27bea63bcc3431bbbcd37cb8 100644 (file)
@@ -788,7 +788,7 @@ extern mod complicated_mod = "some-file/in/the-rust/path";
 ##### Use declarations
 
 ~~~~~~~~ {.ebnf .gram}
-use_decl : "pub"? "use" ident [ '=' path
+use_decl : "pub" ? "use" ident [ '=' path
                           | "::" path_glob ] ;
 
 path_glob : ident [ "::" path_glob ] ?
@@ -1920,7 +1920,7 @@ it is automatically dereferenced to make the field access possible.
 ### Vector expressions
 
 ~~~~~~~~{.ebnf .gram}
-vec_expr : '[' "mut"? vec_elems? ']'
+vec_expr : '[' "mut" ? vec_elems? ']'
 
 vec_elems : [expr [',' expr]*] | [expr ',' ".." expr]
 ~~~~~~~~