Skip to content

Commit 1d56bd3

Browse files
committed
document COFF alignment limit
This document the following change to the compiler that enforces the limit: rust-lang/rust#142638.
1 parent 32b22e8 commit 1d56bd3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/type-layout.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,9 @@ guarantees.
573573
r[layout.repr.alignment.constraint-alignment]
574574
The alignment is specified as an integer parameter in the form of
575575
`#[repr(align(x))]` or `#[repr(packed(x))]`. The alignment value must be a
576-
power of two from 1 up to 2<sup>29</sup>. For `packed`, if no value is given,
577-
as in `#[repr(packed)]`, then the value is 1.
576+
power of two from 1 up to 2<sup>29</sup> or a target-specific limit. For COFF
577+
targets the limit is 8192. For `packed`, if no value is given, as in
578+
`#[repr(packed)]`, then the value is 1.
578579

579580
r[layout.repr.alignment.align]
580581
For `align`, if the specified alignment is less than the alignment of the type

0 commit comments

Comments
 (0)