about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCAD97 <cad97@cad97.com>2022-05-14 22:30:14 -0500
committerCAD97 <cad97@cad97.com>2022-05-14 22:30:14 -0500
commit09dc24bc04ed162b92790195f2f84bc674cc3025 (patch)
tree4be0589570b4ebbde6d1d143a763fcbaf8a42e83
parent2a8a0fc4237da544aca0d6631ee467891caad9ad (diff)
downloadrust-09dc24bc04ed162b92790195f2f84bc674cc3025.tar.gz
rust-09dc24bc04ed162b92790195f2f84bc674cc3025.zip
Remove potentially misleading realloc parenthetical
-rw-r--r--library/core/src/alloc/global.rs8
-rw-r--r--library/core/src/alloc/mod.rs6
2 files changed, 5 insertions, 9 deletions
diff --git a/library/core/src/alloc/global.rs b/library/core/src/alloc/global.rs
index 8839a69d119..887246c6001 100644
--- a/library/core/src/alloc/global.rs
+++ b/library/core/src/alloc/global.rs
@@ -208,11 +208,9 @@ pub unsafe trait GlobalAlloc {
     ///
     /// If this returns a non-null pointer, then ownership of the memory block
     /// referenced by `ptr` has been transferred to this allocator.
-    /// 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). The new memory block is allocated with `layout`, but
-    /// with the `size` updated to `new_size`. This new layout should be
+    /// The memory may or may not have been deallocated, and should be
+    /// considered unusable. The new memory block is allocated with `layout`,
+    /// but with the `size` updated to `new_size`. This new layout should be
     /// used when deallocating the new memory block with `dealloc`. The range
     /// `0..min(layout.size(), new_size)` of the new memory block is
     /// guaranteed to have the same values as the original block.
diff --git a/library/core/src/alloc/mod.rs b/library/core/src/alloc/mod.rs
index a034562d13a..6cc6e359e65 100644
--- a/library/core/src/alloc/mod.rs
+++ b/library/core/src/alloc/mod.rs
@@ -161,8 +161,7 @@ pub unsafe trait Allocator {
     ///
     /// If this returns `Ok`, then ownership of the memory block referenced by `ptr` has been
     /// transferred to this allocator. The memory may or may not have been freed, and should be
-    /// considered unusable unless it was transferred back to the caller again via the return value
-    /// of this method.
+    /// considered unusable.
     ///
     /// If this method returns `Err`, then ownership of the memory block has not been transferred to
     /// this allocator, and the contents of the memory block are unaltered.
@@ -288,8 +287,7 @@ pub unsafe trait Allocator {
     ///
     /// If this returns `Ok`, then ownership of the memory block referenced by `ptr` has been
     /// transferred to this allocator. The memory may or may not have been freed, and should be
-    /// considered unusable unless it was transferred back to the caller again via the return value
-    /// of this method.
+    /// considered unusable.
     ///
     /// If this method returns `Err`, then ownership of the memory block has not been transferred to
     /// this allocator, and the contents of the memory block are unaltered.