diff --git a/src/expressions/match-expr.md b/src/expressions/match-expr.md index 3dbbf43da..8de9ae0c4 100644 --- a/src/expressions/match-expr.md +++ b/src/expressions/match-expr.md @@ -2,13 +2,26 @@ > **Syntax** > _MatchExpression_ : ->    `match` [_Expression_]_except struct expression_ _MatchBlock_ +>    `match` [_Expression_]_except struct expression_ `{` +>       [_InnerAttribute_]\* +>       _MatchArms_? +>    `}` > -> _MatchBlock_ : ->       `{` `}` ->    | `{` (`|`? _Pattern_ (`|` _Pattern_)\* (`if` [_Expression_])? `=>` ([_BlockExpression_] `,`? | [_Expression_] `,`))\* ->            (`|`? _Pattern_ (`|` _Pattern_)\* (`if` [_Expression_])? `=>` ([_BlockExpression_] `,`? | [_Expression_] `,`?)) ->       `}` +> _MatchArms_ : +>    ( _MatchArm_ `=>` +> ( [_BlockExpression_] `,`? +> | [_Expression_] `,` ) +> )\* +>    _MatchArm_ `=>` ( [_BlockExpression_] | [_Expression_] ) `,`? +> +> _MatchArm_ : +>    [_OuterAttribute_]\* _MatchArmPatterns_ _MatchArmGuard_ +> +> _MatchArmPatterns_ : +>    `|`? _Pattern_ ( `|` _Pattern_ )* +> +> _MatchArmGuard_ : +>    `if` [_Expression_] A `match` expression branches on a *pattern*. The exact form of matching that occurs depends on the pattern. Patterns consist of some combination of @@ -141,4 +154,6 @@ let message = match maybe_digit { [place expression]: expressions.html#place-expressions-and-value-expressions [value expression]: expressions.html#place-expressions-and-value-expressions [`char`]: types.html#textual-types -[numeric types]: types.html#numeric-types \ No newline at end of file +[numeric types]: types.html#numeric-types +[_InnerAttribute_]: attributes.html +[_OuterAttribute_]: attributes.html