mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 19:17:43 +00:00
![]() More precisely document `Global::deallocate()`'s safety. There is a subtlety which "other conditions must be upheld by the caller" does not capture: `GlobalAlloc`/`alloc::dealloc()` require that the provided layout will be *equal*, not just that it "fits", the layout used to allocate. This is always true here due to how `allocate()`, `grow()`, and `shrink()` are implemented (they never return a larger allocation than requested), but that is a non-local property of the implementation, so it should be documented explicitly. r? libs `@rustbot` label A-allocators |
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
Cargo.toml |