about summary refs log tree commit diff
path: root/src/libcollections/string.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcollections/string.rs')
-rw-r--r--src/libcollections/string.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs
index eedf4c2c11f..8ba5c6ffbf2 100644
--- a/src/libcollections/string.rs
+++ b/src/libcollections/string.rs
@@ -701,6 +701,12 @@ impl String {
     /// Violating these may cause problems like corrupting the allocator's
     /// internal datastructures.
     ///
+    /// The ownership of `ptr` is effectively transferred to the
+    /// `String` which may then deallocate, reallocate or change the
+    /// contents of memory pointed to by the pointer at will. Ensure
+    /// that nothing else uses the pointer after calling this
+    /// function.
+    ///
     /// # Examples
     ///
     /// Basic usage: