File tree 2 files changed +5
-9
lines changed
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 {
208
208
///
209
209
/// If this returns a non-null pointer, then ownership of the memory block
210
210
/// 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
216
214
/// used when deallocating the new memory block with `dealloc`. The range
217
215
/// `0..min(layout.size(), new_size)` of the new memory block is
218
216
/// 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 {
161
161
///
162
162
/// If this returns `Ok`, then ownership of the memory block referenced by `ptr` has been
163
163
/// 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.
166
165
///
167
166
/// If this method returns `Err`, then ownership of the memory block has not been transferred to
168
167
/// this allocator, and the contents of the memory block are unaltered.
@@ -288,8 +287,7 @@ pub unsafe trait Allocator {
288
287
///
289
288
/// If this returns `Ok`, then ownership of the memory block referenced by `ptr` has been
290
289
/// 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.
293
291
///
294
292
/// If this method returns `Err`, then ownership of the memory block has not been transferred to
295
293
/// this allocator, and the contents of the memory block are unaltered.
You can’t perform that action at this time.
0 commit comments