@@ -848,11 +848,11 @@ extern crate foo = "some/where/rust-foo#foo:1.0"; // a full crate ID for externa
848848##### Use declarations
849849
850850~~~~ {.notrust .ebnf .gram}
851- use_decl : "pub" ? "use" ident [ '=' path
852- | "::" path_glob ] ;
851+ use_decl : "pub" ? "use" [ ident '=' path
852+ | path_glob ] ;
853853
854- path_glob : ident [ "::" path_glob ] ?
855- | '*'
854+ path_glob : ident [ "::" [ path_glob
855+ | '*' ] ] ?
856856 | '{' ident [ ',' ident ] * '}' ;
857857~~~~
858858
@@ -1743,7 +1743,7 @@ import public items from their destination, not private items.
17431743attribute : '#' '!' ? '[' meta_item ']' ;
17441744meta_item : ident [ '=' literal
17451745 | '(' meta_seq ')' ] ? ;
1746- meta_seq : meta_item [ ',' meta_seq ]* ;
1746+ meta_seq : meta_item [ ',' meta_seq ] ? ;
17471747~~~~
17481748
17491749Static entities in Rust &mdash ; crates, modules and items &mdash ; may have _ attributes_
@@ -3027,11 +3027,11 @@ then any `else` block is executed.
30273027### Match expressions
30283028
30293029~~~~ {.notrust .ebnf .gram}
3030- match_expr : "match" expr '{' match_arm [ '|' match_arm ] * '}' ;
3030+ match_expr : "match" expr '{' match_arm * '}' ;
30313031
3032- match_arm : match_pat "=>" [ expr "," | '{' block '}' ] ;
3032+ match_arm : attribute * match_pat "=>" [ expr "," | '{' block '}' ] ;
30333033
3034- match_pat : pat [ ".." pat ] ? [ "if" expr ] ;
3034+ match_pat : pat [ '|' pat ] * [ "if" expr ] ? ;
30353035~~~~
30363036
30373037A ` match ` expression branches on a * pattern* . The exact form of matching that
@@ -3137,7 +3137,7 @@ using the `ref` keyword,
31373137or to a mutable reference using ` ref mut ` .
31383138
31393139Subpatterns can also be bound to variables by the use of the syntax
3140- ` variable @ pattern ` .
3140+ ` variable @ subpattern ` .
31413141For example:
31423142
31433143~~~~
0 commit comments