Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/type-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ r[layout.tuple]
## Tuple layout

r[layout.tuple.def]
Tuples are laid out according to the [`Rust` representation][`Rust`].
Tuples are laid out according to the same rules as structs using the [`Rust` representation][`Rust`].

They are laid out like a struct without generic parameters. This means that the last field of the tuple is not guaranteed to be stored at the end.

@RalfJung RalfJung Jul 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we document anything about the last field of structs? I don't think we should, we should just say that coercions are sound but we don't have to specify the means by which the compiler makes them sound.

View changes since the review


r[layout.tuple.unit]
The exception to this is the unit tuple (`()`), which is guaranteed as a [zero-sized type] to have a size of 0 and an alignment of 1.
Expand Down
Loading