diff options
| author | Matthew Parkinson <mattpark@microsoft.com> | 2020-01-20 10:01:17 +0000 |
|---|---|---|
| committer | Matthew Parkinson <mattpark@microsoft.com> | 2020-01-20 10:09:51 +0000 |
| commit | 6be3446f92b444cd6584c7948be9f7cf20ce5518 (patch) | |
| tree | 26b5f5c0052241459b16a115bbb4343446616981 | |
| parent | 900811e43047fc5593f39b0363373530b02c87e0 (diff) | |
| download | rust-6be3446f92b444cd6584c7948be9f7cf20ce5518.tar.gz rust-6be3446f92b444cd6584c7948be9f7cf20ce5518.zip | |
Added minor clarification to specification of realloc.
The `layout` for the returned allocation of a `realloc` is only implicitly specified. This change makes it explicit.
| -rw-r--r-- | src/libcore/alloc.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs index 4354e1c7b5f..09f743fb81e 100644 --- a/src/libcore/alloc.rs +++ b/src/libcore/alloc.rs @@ -525,7 +525,8 @@ pub unsafe trait GlobalAlloc { /// The memory may or may not have been deallocated, /// and should be considered unusable (unless of course it was /// transferred back to the caller again via the return value of - /// this method). + /// this method). The new memory block is allocated with `layout`, but + /// with the `size` updated to `new_size`. /// /// If this method returns null, then ownership of the memory /// block has not been transferred to this allocator, and the |
