Skip to content

Commit 57e12f9

Browse files
Clarify that copied allocators must behave the same
1 parent 90711a8 commit 57e12f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/core/src/alloc/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ impl fmt::Display for AllocError {
9595
/// # Safety
9696
///
9797
/// * Memory blocks returned from an allocator must point to valid memory and retain their validity
98-
/// until the instance and all of its clones are dropped,
98+
/// until the instance and all of its copies and clones are dropped,
9999
///
100-
/// * cloning or moving the allocator must not invalidate memory blocks returned from this
101-
/// allocator. A cloned allocator must behave like the same allocator, and
100+
/// * copying, cloning, or moving the allocator must not invalidate memory blocks returned from this
101+
/// allocator. A copied or cloned allocator must behave like the same allocator, and
102102
///
103103
/// * any pointer to a memory block which is [*currently allocated*] may be passed to any other
104104
/// method of the allocator.

0 commit comments

Comments
 (0)