From 6be3446f92b444cd6584c7948be9f7cf20ce5518 Mon Sep 17 00:00:00 2001 From: Matthew Parkinson Date: Mon, 20 Jan 2020 10:01:17 +0000 Subject: [PATCH] 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. --- src/libcore/alloc.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs index 4354e1c7b5f69..09f743fb81e4c 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