@@ -40,8 +40,14 @@ item that the attribute is declared within. _Outer attributes_, written without
40
40
the bang after the hash, apply to the item or generic parameter that follow the
41
41
attribute.
42
42
43
- Any [ item declaration] or [ generic lifetime or type parameter] [ generics ] may
44
- have an attribute applied to it.
43
+ Attributes may be applied to many things in the language:
44
+
45
+ * All [ item declarations] accept outer attributes while [ external blocks] ,
46
+ [ functions] , [ implementations] , and [ modules] accept inner attributes.
47
+ * [ Statements] accept outer attributes.
48
+ * [ Enum] variants and [ struct] and [ union] fields accept outer attributes.
49
+ * [ Match expression arms] [ match expressions ] accept outer attributes.
50
+ * [ Generic lifetime or type parameter] [ generics ] accept outer attributes.
45
51
46
52
An example of attributes:
47
53
@@ -545,5 +551,10 @@ You can implement `derive` for your own type through [procedural macros].
545
551
[ zero-variant enum ] : items/enumerations.html#zero-variant-enums
546
552
[ ECMA-334 ] : https://www.ecma-international.org/publications/standards/Ecma-334.htm
547
553
[ ECMA-335 ] : https://www.ecma-international.org/publications/standards/Ecma-335.htm
548
- [ item declaration ] : items.html
549
- [ generics ] : generics.html
554
+ [ item declarations ] : items.html
555
+ [ generics ] : items/generics.html
556
+ [ implementations ] : items/implementations.html
557
+ [ modules ] : items/modules.html
558
+ [ statements ] : statements.html
559
+ [ match expressions ] : expressions/match-expr.html
560
+ [ external blocks ] : items/external-blocks.html
0 commit comments