Skip to content

Commit

Permalink
Add reference for attributes in function parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
c410-f3r committed Aug 22, 2019
1 parent 2b29a56 commit dbbb6ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Attributes may be applied to many things in the language:
* [Generic lifetime or type parameter][generics] accept outer attributes.
* Expressions accept outer attributes in limited situations, see [Expression
Attributes] for details.
* [Function][functions] parameters accept outer attributes.

Some examples of attributes:

Expand Down
3 changes: 2 additions & 1 deletion src/items/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
> &nbsp;&nbsp; _FunctionParam_ (`,` _FunctionParam_)<sup>\*</sup> `,`<sup>?</sup>
>
> _FunctionParam_ :\
> &nbsp;&nbsp; [_Pattern_] `:` [_Type_]
> &nbsp;&nbsp; [_OuterAttribute_]<sup>\*</sup>\ [_Pattern_] `:` [_Type_]
>
> _FunctionReturnType_ :\
> &nbsp;&nbsp; `->` [_Type_]
Expand Down Expand Up @@ -282,3 +282,4 @@ attributes macros.
[`link_section`]: ../abi.md#the-link_section-attribute
[`no_mangle`]: ../abi.md#the-no_mangle-attribute
[external_block_abi]: external-blocks.md#abi
[_OuterAttribute_]: ../attributes.md

0 comments on commit dbbb6ad

Please sign in to comment.