From c7bbfaf9ab410e1ff27b37d9d098ab3e1f498ebe Mon Sep 17 00:00:00 2001 From: Joshua Liebow-Feeser Date: Mon, 21 Mar 2022 12:45:51 -0700 Subject: [PATCH] Use "An important consequence" language --- src/type-layout.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/type-layout.md b/src/type-layout.md index f45c960d4..ce9296662 100644 --- a/src/type-layout.md +++ b/src/type-layout.md @@ -517,9 +517,9 @@ The alignments of each field, for the purpose of positioning fields, is the smaller of the specified alignment and the alignment of the field's type. Inter-field padding is guaranteed to be the minimum required in order to satisfy each field's (possibly altered) alignment (although note that, on its -own, `packed` does not provide any guarantee about field ordering). An -important special case is `#[repr(packed(1))]` (or `#[repr(packed)]`), which -guarantees that no inter-field padding will be present. +own, `packed` does not provide any guarantee about field ordering). An +important consequence of these rules is that a type with `#[repr(packed(1))]` +(or `#[repr(packed)]`) will have no inter-field padding. The `align` and `packed` modifiers cannot be applied on the same type and a `packed` type cannot transitively contain another `align`ed type. `align` and