rust/library/alloc
Matthias Krüger e8134a3380
Rollup merge of #137641 - kpreid:dealloc, r=Amanieu
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
2025-03-02 22:44:24 +01:00
..
benches library: Update rand to 0.9.0 2025-02-13 12:20:55 -08:00
src Rollup merge of #137641 - kpreid:dealloc, r=Amanieu 2025-03-02 22:44:24 +01:00
tests Rollup merge of #137109 - bend-n:knife, r=oli-obk 2025-02-24 18:46:35 -05:00
Cargo.toml Update compiler-builtins to 0.1.148 2025-02-24 07:46:55 +00:00