about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-23 15:09:10 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-23 15:09:10 -0700
commit88ae218578e41f5e8fbecb03dea32dfcafc7ec76 (patch)
tree829d6ae78542cb74fc45fc4e240a2b8cdc9df8f8
parent2153c581ef66de1537286b58b1b323d24c25d07f (diff)
parent2750e3c83e7cfbad779877ac213bd815c6aa65bb (diff)
downloadrust-88ae218578e41f5e8fbecb03dea32dfcafc7ec76.tar.gz
rust-88ae218578e41f5e8fbecb03dea32dfcafc7ec76.zip
rollup merge of #23561: steveklabnik/gh23422
Fixes #23422
-rw-r--r--src/liballoc/heap.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/liballoc/heap.rs b/src/liballoc/heap.rs
index aaf6e76237c..3733350412e 100644
--- a/src/liballoc/heap.rs
+++ b/src/liballoc/heap.rs
@@ -26,6 +26,9 @@ pub unsafe fn allocate(size: usize, align: usize) -> *mut u8 {
 ///
 /// On failure, return a null pointer and leave the original allocation intact.
 ///
+/// If the allocation was relocated, the memory at the passed-in pointer is
+/// undefined after the call.
+///
 /// Behavior is undefined if the requested size is 0 or the alignment is not a
 /// power of 2. The alignment must be no larger than the largest supported page
 /// size on the platform.