Skip to content

Commit 6be3446

Browse files
committed
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.
1 parent 900811e commit 6be3446

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libcore/alloc.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,8 @@ pub unsafe trait GlobalAlloc {
525525
/// The memory may or may not have been deallocated,
526526
/// and should be considered unusable (unless of course it was
527527
/// transferred back to the caller again via the return value of
528-
/// this method).
528+
/// this method). The new memory block is allocated with `layout`, but
529+
/// with the `size` updated to `new_size`.
529530
///
530531
/// If this method returns null, then ownership of the memory
531532
/// block has not been transferred to this allocator, and the

0 commit comments

Comments
 (0)