2121>   ;  ; | _ MetaItem_
2222>   ;  ; | _ MetaItem_ ` , ` _ MetaSeq_
2323
24- An _ attribute_ is a
25- general, free-form metadatum that is interpreted according to name, convention,
26- and language and compiler version. Attributes are modeled on Attributes in
27- [ ECMA-335] , with the syntax coming from [ ECMA-334] \( C#).
24+ An _ attribute_ is a general, free-form metadatum that is interpreted according
25+ to name, convention, and language and compiler version. Attributes are modeled
26+ on Attributes in [ ECMA-335] , with the syntax coming from [ ECMA-334] \( C#).
2827
2928Attributes may appear as any of:
3029
@@ -45,6 +44,9 @@ Attributes may be applied to many things in the language:
4544* All [ item declarations] accept outer attributes while [ external blocks] ,
4645 [ functions] , [ implementations] , and [ modules] accept inner attributes.
4746* [ Statements] accept outer attributes.
47+ * [ Block expressions] accept outer and inner attributes, but only when they are
48+ the outer expression of an [ expression statement] or the final expression of
49+ another block expression.
4850* [ Enum] variants and [ struct] and [ union] fields accept outer attributes.
4951* [ Match expression arms] [ match expressions ] accept outer attributes.
5052* [ Generic lifetime or type parameter] [ generics ] accept outer attributes.
@@ -557,6 +559,7 @@ You can implement `derive` for your own type through [procedural macros].
557559[ expression statement ] : statements.html#expression-statements
558560[ call expression ] : expressions/call-expr.html
559561[ block expression ] : expressions/block-expr.html
562+ [ block expressions ] : expressions/block-expr.html
560563[ `Drop` ] : special-types-and-traits.html#drop
561564[ let statement ] : statements.html#let-statements
562565[ unstable book plugin ] : ../unstable-book/language-features/plugin.html#lint-plugins
@@ -569,4 +572,4 @@ You can implement `derive` for your own type through [procedural macros].
569572[ modules ] : items/modules.html
570573[ statements ] : statements.html
571574[ match expressions ] : expressions/match-expr.html
572- [ external blocks ] : items/external-blocks.html
575+ [ external blocks ] : items/external-blocks.html
0 commit comments