File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Attributes
2
2
3
+ > ** <sup >Syntax</sup >**
4
+ > _ Attribute_ :
5
+ >   ;  ; _ InnerAttribute_ | _ OuterAttribute_
6
+ >
7
+ > _ InnerAttribute_ :
8
+ >   ;  ; ` #![ ` MetaItem ` ] `
9
+ >
10
+ > _ OuterAttribute_ :
11
+ >   ;  ; ` #[ ` MetaItem ` ] `
12
+ >
13
+ > _ MetaItem_ :
14
+ >   ;  ;   ;  ; IDENTIFIER
15
+ >   ;  ; | IDENTIFIER ` = ` LITERAL
16
+ >   ;  ; | IDENTIFIER ` ( ` _ MetaSeq_ ` ) `
17
+ >   ;  ; | IDENTIFIER ` ( ` _ MetaSeq_ ` , ` ` ) `
18
+ >
19
+ > _ MetaSeq_ :
20
+ >   ;  ;   ;  ; EMPTY
21
+ >   ;  ; | _ MetaItem_
22
+ >   ;  ; | _ MetaSeq_ ` , ` _ MetaItem_
23
+
3
24
Any item declaration may have an _ attribute_ applied to it. Attributes in Rust
4
25
are modeled on Attributes in ECMA-335, with the syntax coming from ECMA-334
5
26
(C#). An attribute is a general, free-form metadatum that is interpreted
You can’t perform that action at this time.
0 commit comments