From 1d56bd3eff842ca299005d63326ad132d87ecb7a Mon Sep 17 00:00:00 2001 From: Nicolas Thery Date: Sun, 9 Nov 2025 17:17:07 +0100 Subject: [PATCH] document COFF alignment limit This document the following change to the compiler that enforces the limit: https://github.com/rust-lang/rust/pull/142638. --- src/type-layout.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/type-layout.md b/src/type-layout.md index 24a9b4dbfd..19f364f28d 100644 --- a/src/type-layout.md +++ b/src/type-layout.md @@ -573,8 +573,9 @@ guarantees. r[layout.repr.alignment.constraint-alignment] The alignment is specified as an integer parameter in the form of `#[repr(align(x))]` or `#[repr(packed(x))]`. The alignment value must be a -power of two from 1 up to 229. For `packed`, if no value is given, -as in `#[repr(packed)]`, then the value is 1. +power of two from 1 up to 229 or a target-specific limit. For COFF +targets the limit is 8192. For `packed`, if no value is given, as in +`#[repr(packed)]`, then the value is 1. r[layout.repr.alignment.align] For `align`, if the specified alignment is less than the alignment of the type