We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1ed0941 + 4bc6227 commit 95cb608Copy full SHA for 95cb608
src/type-layout.md
@@ -322,6 +322,10 @@ The `align` and `packed` modifiers cannot be applied on the same type and a
322
`packed` type cannot transitively contain another `align`ed type. `align` and
323
`packed` may only be applied to the [default] and [`C`] representations.
324
325
+The `align` modifier can also be applied on an `enum`.
326
+When it is, the effect on the `enum`'s alignment is the same as if the `enum`
327
+was wrapped in a newtype `struct` with the same `align` modifier.
328
+
329
<div class="warning">
330
331
***Warning:*** Dereferencing an unaligned pointer is [undefined behavior] and
0 commit comments