File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,11 @@ let message = match maybe_digit {
174174};
175175```
176176
177+ ## Attributes on match arms
178+
179+ Outer attributes are allowed on match arms. The only attributes that have
180+ meaning on match arms are [ ` cfg ` ] , ` cold ` , and the [ lint check attributes] .
181+
177182[ _Expression_ ] : expressions.html
178183[ _BlockExpression_ ] : expressions/block-expr.html#block-expressions
179184[ place expression ] : expressions.html#place-expressions-and-value-expressions
@@ -182,3 +187,5 @@ let message = match maybe_digit {
182187[ numeric types ] : types.html#numeric-types
183188[ _InnerAttribute_ ] : attributes.html
184189[ _OuterAttribute_ ] : attributes.html
190+ [ `cfg` ] : attributes.html#conditional-compilation
191+ [ lint check attributes ] : attributes.html#lint-check-attributes
You can’t perform that action at this time.
0 commit comments