This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -208,11 +208,9 @@ pub unsafe trait GlobalAlloc {
208208 ///
209209 /// If this returns a non-null pointer, then ownership of the memory block
210210 /// referenced by `ptr` has been transferred to this allocator.
211- /// The memory may or may not have been deallocated,
212- /// and should be considered unusable (unless of course it was
213- /// transferred back to the caller again via the return value of
214- /// this method). The new memory block is allocated with `layout`, but
215- /// with the `size` updated to `new_size`. This new layout should be
211+ /// The memory may or may not have been deallocated, and should be
212+ /// considered unusable. The new memory block is allocated with `layout`,
213+ /// but with the `size` updated to `new_size`. This new layout should be
216214 /// used when deallocating the new memory block with `dealloc`. The range
217215 /// `0..min(layout.size(), new_size)` of the new memory block is
218216 /// guaranteed to have the same values as the original block.
Original file line number Diff line number Diff line change @@ -161,8 +161,7 @@ pub unsafe trait Allocator {
161161 ///
162162 /// If this returns `Ok`, then ownership of the memory block referenced by `ptr` has been
163163 /// transferred to this allocator. The memory may or may not have been freed, and should be
164- /// considered unusable unless it was transferred back to the caller again via the return value
165- /// of this method.
164+ /// considered unusable.
166165 ///
167166 /// If this method returns `Err`, then ownership of the memory block has not been transferred to
168167 /// this allocator, and the contents of the memory block are unaltered.
@@ -288,8 +287,7 @@ pub unsafe trait Allocator {
288287 ///
289288 /// If this returns `Ok`, then ownership of the memory block referenced by `ptr` has been
290289 /// transferred to this allocator. The memory may or may not have been freed, and should be
291- /// considered unusable unless it was transferred back to the caller again via the return value
292- /// of this method.
290+ /// considered unusable.
293291 ///
294292 /// If this method returns `Err`, then ownership of the memory block has not been transferred to
295293 /// this allocator, and the contents of the memory block are unaltered.
You can’t perform that action at this time.
0 commit comments