1313> _ MetaItem_ :
1414>   ;  ;   ;  ; IDENTIFIER
1515>   ;  ; | IDENTIFIER ` = ` LITERAL
16+ >   ;  ; | IDENTIFIER ` ( ` LITERAL ` ) `
1617>   ;  ; | IDENTIFIER ` ( ` _ MetaSeq_ ` ) `
1718>   ;  ; | IDENTIFIER ` ( ` _ MetaSeq_ ` , ` ` ) `
1819>
@@ -30,6 +31,8 @@ may appear as any of:
3031* A single identifier, the attribute name
3132* An identifier followed by the equals sign '=' and a literal, providing a
3233 key/value pair
34+ * An identifier followed by a parenthesized literal, providing a
35+ key/value pair
3336* An identifier followed by a parenthesized list of sub-attribute arguments
3437
3538Attributes with a bang ("!") after the hash ("#") apply to the item that the
@@ -130,26 +133,8 @@ interpreted:
130133- ` linkage ` - on a static, this specifies the [ linkage
131134 type] ( http://llvm.org/docs/LangRef.html#linkage-types ) .
132135
133- On ` enum ` s:
134-
135- - ` repr ` - on C-like enums, this sets the underlying type used for
136- representation. Takes one argument, which is the primitive
137- type this enum should be represented for, or ` C ` , which specifies that it
138- should be the default ` enum ` size of the C ABI for that platform. Note that
139- enum representation in C is undefined, and this may be incorrect when the C
140- code is compiled with certain flags.
141-
142- On ` struct ` s:
143-
144- - ` repr ` - specifies the representation to use for this struct. Takes a list
145- of options. The currently accepted ones are ` C ` and ` packed ` , which may be
146- combined. ` C ` will use a C ABI compatible struct layout, and ` packed ` will
147- remove any padding between fields (note that this is very fragile and may
148- break platforms which require aligned access).
149-
150- On ` union ` s:
151-
152- - ` repr ` - Same as per ` struct ` .
136+ See [ type layout] ( type-layout.html ) for documentation on the ` repr ` attribute
137+ which can be used to control type layout.
153138
154139## Macro-related attributes
155140
@@ -416,4 +401,4 @@ You can implement `derive` for your own type through [procedural macros].
416401
417402[ Doc comments ] : comments.html#doc-comments
418403[ The Rustdoc Book ] : ../rustdoc/the-doc-attribute.html
419- [ procedural macros ] : procedural-macros.html
404+ [ procedural macros ] : procedural-macros.html
0 commit comments