Closed autumnontape closed 2 years ago
Sounds good, would you be willing to make a PR to rust-lang/rust to update the documentation?
Sure! I can probably do that a few hours from now.
I've opened https://github.com/rust-lang/rust/pull/95546.
https://github.com/rust-lang/rust/pull/95546 was merged!
The docs currently imply that the alignment of
new_layout
may be different from that ofold_layout
by not stating otherwise. Reallocations with altered alignments are extremely uncommon; I had to track down #5 in this repository to convince myself this wasn't a mistake. This could be a pitfall for implementors ofAllocator
if it's not made more explicit.