We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd822ea commit 8c1cb09Copy full SHA for 8c1cb09
src/expressions/match-expr.md
@@ -174,6 +174,11 @@ let message = match maybe_digit {
174
};
175
```
176
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
182
[_Expression_]: expressions.html
183
[_BlockExpression_]: expressions/block-expr.html#block-expressions
184
[place expression]: expressions.html#place-expressions-and-value-expressions
@@ -182,3 +187,5 @@ let message = match maybe_digit {
187
[numeric types]: types.html#numeric-types
188
[_InnerAttribute_]: attributes.html
189
[_OuterAttribute_]: attributes.html
190
+[`cfg`]: attributes.html#conditional-compilation
191
+[lint check attributes]: attributes.html#lint-check-attributes
0 commit comments