Open
Description
This note:
https://doc.rust-lang.org/reference/type-layout.html#r-layout.pointer.unsized
says (as of june 2025):
Though you should not rely on this, all pointers to DSTs are currently twice the size of the size of usize and have the same alignment.
However, this is only partially true since https://doc.rust-lang.org/reference/dynamically-sized-types.html#r-dynamic-sized.pointer-types states that fat pointers are twice the size of a normal pointer (and in the usize section we know that usize is the size of a pointer).
The only "helpful note" here is about the alignment, but even that seems clear by fat pointers being the size of two usize
(but technically possible for it to have a weird alignment)
Metadata
Metadata
Assignees
Labels
No labels