about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorKevin Reid <kpreid@switchb.org>2025-02-25 13:02:48 -0800
committerKevin Reid <kpreid@switchb.org>2025-02-25 13:07:52 -0800
commit33ee398fdaa849e096e4935dba7cf599b9f6b832 (patch)
treeff2b3fa8ba782074bc3731b53b76520ee73e48c2 /compiler/rustc_codegen_llvm/src
parent4ecd70ddd1039a3954056c1071e40278048476fa (diff)
downloadrust-33ee398fdaa849e096e4935dba7cf599b9f6b832.tar.gz
rust-33ee398fdaa849e096e4935dba7cf599b9f6b832.zip
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.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions