You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/type-layout.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -595,7 +595,7 @@ own, `packed` does not provide any guarantee about field ordering). An
595
595
important consequence of these rules is that a type with `#[repr(packed(1))]`
596
596
(or `#[repr(packed)]`) will have no inter-field padding.
597
597
598
-
[r[layout.repr.packed.borrowing]]
598
+
r[layout.repr.packed.borrowing]
599
599
When borrowing a field of a `repr(packed(...))` struct, Rust must not create a **misaligned reference** (which would be undefined behavior). Therefore:
600
600
601
601
- It is a **hard error** (E0793) to create a reference whose **ABI alignment requirement** is **greater** than the struct’s packed alignment.
0 commit comments