13
13
> _ MetaItem_ :
14
14
>   ;  ;   ;  ; IDENTIFIER
15
15
>   ;  ; | IDENTIFIER ` = ` LITERAL
16
+ >   ;  ; | IDENTIFIER ` ( ` LITERAL ` ) `
16
17
>   ;  ; | IDENTIFIER ` ( ` _ MetaSeq_ ` ) `
17
18
>   ;  ; | IDENTIFIER ` ( ` _ MetaSeq_ ` , ` ` ) `
18
19
>
@@ -30,6 +31,8 @@ may appear as any of:
30
31
* A single identifier, the attribute name
31
32
* An identifier followed by the equals sign '=' and a literal, providing a
32
33
key/value pair
34
+ * An identifier followed by a parenthesized literal, providing a
35
+ key/value pair
33
36
* An identifier followed by a parenthesized list of sub-attribute arguments
34
37
35
38
Attributes with a bang ("!") after the hash ("#") apply to the item that the
@@ -130,26 +133,8 @@ interpreted:
130
133
- ` linkage ` - on a static, this specifies the [ linkage
131
134
type] ( http://llvm.org/docs/LangRef.html#linkage-types ) .
132
135
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 implementation-defined, and may not be compatible
140
- when the C 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.
153
138
154
139
## Macro-related attributes
155
140
0 commit comments