Skip to content

Commit dbbb6ad

Browse files
committed
Add reference for attributes in function parameters
1 parent 2b29a56 commit dbbb6ad

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/attributes.md

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Attributes may be applied to many things in the language:
5050
* [Generic lifetime or type parameter][generics] accept outer attributes.
5151
* Expressions accept outer attributes in limited situations, see [Expression
5252
Attributes] for details.
53+
* [Function][functions] parameters accept outer attributes.
5354

5455
Some examples of attributes:
5556

src/items/functions.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
> &nbsp;&nbsp; _FunctionParam_ (`,` _FunctionParam_)<sup>\*</sup> `,`<sup>?</sup>
1818
>
1919
> _FunctionParam_ :\
20-
> &nbsp;&nbsp; [_Pattern_] `:` [_Type_]
20+
> &nbsp;&nbsp; [_OuterAttribute_]<sup>\*</sup>\ [_Pattern_] `:` [_Type_]
2121
>
2222
> _FunctionReturnType_ :\
2323
> &nbsp;&nbsp; `->` [_Type_]
@@ -282,3 +282,4 @@ attributes macros.
282282
[`link_section`]: ../abi.md#the-link_section-attribute
283283
[`no_mangle`]: ../abi.md#the-no_mangle-attribute
284284
[external_block_abi]: external-blocks.md#abi
285+
[_OuterAttribute_]: ../attributes.md

0 commit comments

Comments
 (0)