File tree 3 files changed +4
-8
lines changed
3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,6 @@ a following semicolon except if its outer expression is a flow control
28
28
expression. Furthermore, extra semicolons between statements are allowed, but
29
29
these semicolons do not affect semantics.
30
30
31
- > Note: The semicolon following a statement is not a part of the statement
32
- > itself. They are invalid when using the ` stmt ` macro matcher.
33
-
34
31
When evaluating a block expression, each statement, except for item declaration
35
32
statements, is executed sequentially. Then the final expression is executed,
36
33
if given.
Original file line number Diff line number Diff line change 9
9
>
10
10
> _ MatchArms_ :\
11
11
>   ;  ; ( _ MatchArm_ ` => `
12
- > ( [ _ BlockExpression _ ] ` , ` < sup >?</ sup >
13
- > | [ _ Expression_ ] ` , ` )
12
+ > ( [ _ ExpressionWithoutBlock _ ] [ _Expression_ ] ` , `
13
+ > | [ _ ExpressionWithBlock _ ] [ _Expression_ ] ` , ` < sup >?</ sup > )
14
14
> )<sup >\* </sup >\
15
- >   ;  ; _ MatchArm_ ` => ` ( [ _ BlockExpression _ ] | [ _ Expression_ ] ) ` , ` <sup >?</sup >
15
+ >   ;  ; _ MatchArm_ ` => ` [ _ Expression_ ] ` , ` <sup >?</sup >
16
16
>
17
17
> _ MatchArm_ :\
18
18
>   ;  ; [ _ OuterAttribute_ ] <sup >\* </sup > _ MatchArmPatterns_ _ MatchArmGuard_ <sup >?</sup >
@@ -146,7 +146,6 @@ expression in the same expression contexts as [attributes on block
146
146
expressions ].
147
147
148
148
[_Expression_ ]: .. / expressions . md
149
- [_BlockExpression_ ]: block - expr . md#block - expressions
150
149
[place expression ]: .. / expressions . md#place - expressions - and - value - expressions
151
150
[value expression ]: .. / expressions . md#place - expressions - and - value - expressions
152
151
[_InnerAttribute_ ]: .. / attributes . md
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ from the point of declaration until the end of the enclosing block scope.
69
69
> ** <sup >Syntax</sup >** \
70
70
> _ ExpressionStatement_ :\
71
71
>   ;  ;   ;  ; [ _ ExpressionWithoutBlock_ ] [ expression ] ` ; ` \
72
- >   ;  ; | [ _ ExpressionWithBlock_ ] [ expression ]
72
+ >   ;  ; | [ _ ExpressionWithBlock_ ] [ expression ] ` ; ` < sup >?</ sup >
73
73
74
74
An * expression statement* is one that evaluates an [ expression] and ignores its
75
75
result. As a rule, an expression statement's purpose is to trigger the effects
You can’t perform that action at this time.
0 commit comments