Skip to content

Commit f567a17

Browse files
committed
replace MatchArmPatterns with Pattern
1 parent 245b833 commit f567a17

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

src/expressions/if-expr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ assert_eq!(y, "Bigger");
4444

4545
> **<sup>Syntax</sup>**\
4646
> _IfLetExpression_ :\
47-
> &nbsp;&nbsp; `if` `let` [_MatchArmPatterns_] `=` [_Expression_]<sub>_except struct or lazy boolean operator expression_</sub>
47+
> &nbsp;&nbsp; `if` `let` [_Pattern_] `=` [_Expression_]<sub>_except struct or lazy boolean operator expression_</sub>
4848
> [_BlockExpression_]\
4949
> &nbsp;&nbsp; (`else` (
5050
> [_BlockExpression_]
@@ -155,7 +155,7 @@ if let PAT = ( EXPR || EXPR ) { .. }
155155
[_BlockExpression_]: block-expr.md
156156
[_Expression_]: ../expressions.md
157157
[_LazyBooleanOperatorExpression_]: operator-expr.md#lazy-boolean-operators
158-
[_MatchArmPatterns_]: match-expr.md
158+
[_Pattern_]: ../patterns.md
159159
[_eRFCIfLetChain_]: https://github.com/rust-lang/rfcs/blob/master/text/2497-if-let-chains.md#rollout-plan-and-transitioning-to-rust-2018
160160
[`match` expression]: match-expr.md
161161
[scrutinee]: ../glossary.md#scrutinee

src/expressions/loop-expr.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ while i < 10 {
6767

6868
> **<sup>Syntax</sup>**\
6969
> [_PredicatePatternLoopExpression_] :\
70-
> &nbsp;&nbsp; `while` `let` [_MatchArmPatterns_] `=` [_Expression_]<sub>_except struct or lazy boolean operator expression_</sub>
70+
> &nbsp;&nbsp; `while` `let` [_Pattern_] `=` [_Expression_]<sub>_except struct or lazy boolean operator expression_</sub>
7171
> [_BlockExpression_]
7272
7373
A `while let` loop is semantically similar to a `while` loop but in place of a
@@ -291,7 +291,6 @@ expression `()`.
291291
[LIFETIME_OR_LABEL]: ../tokens.md#lifetimes-and-loop-labels
292292
[_BlockExpression_]: block-expr.md
293293
[_Expression_]: ../expressions.md
294-
[_MatchArmPatterns_]: match-expr.md
295294
[_Pattern_]: ../patterns.md
296295
[`match` expression]: match-expr.md
297296
[scrutinee]: ../glossary.md#scrutinee

src/expressions/match-expr.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
> &nbsp;&nbsp; _MatchArm_ `=>` [_Expression_] `,`<sup>?</sup>
1616
>
1717
> _MatchArm_ :\
18-
> &nbsp;&nbsp; [_OuterAttribute_]<sup>\*</sup> _MatchArmPatterns_ _MatchArmGuard_<sup>?</sup>
19-
>
20-
> _MatchArmPatterns_ :\
21-
> &nbsp;&nbsp; `|`<sup>?</sup> [_Pattern_] ( `|` [_Pattern_] )<sup>\*</sup>
18+
> &nbsp;&nbsp; [_OuterAttribute_]<sup>\*</sup> [_Pattern_] _MatchArmGuard_<sup>?</sup>
2219
>
2320
> _MatchArmGuard_ :\
2421
> &nbsp;&nbsp; `if` [_Expression_]

0 commit comments

Comments
 (0)