alloc::realloc
does not follow requirements of Layout::from_size_align_unchecked
#108546
Labels
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
C-bug
Category: This is a bug.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
The docs for
Layout::from_size_align_unchecked
state that:alloc::realloc
's docs state a different constraint:So this would be legal according to
alloc::realloc
's docs:But this results in a call internally:
...which is meant to be UB.
I assume this is just that the docs are out of date after #95295.
The text was updated successfully, but these errors were encountered: