Skip to content

Commit 000cd9b

Browse files
committed
fix comment on Allocator trait
1 parent 6032700 commit 000cd9b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

library/core/src/alloc/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,9 @@ impl fmt::Display for AllocError {
9494
///
9595
/// # Safety
9696
///
97-
/// * Memory blocks returned from an allocator must point to valid memory and retain their validity
98-
/// until the instance and all of its copies and clones are dropped,
97+
/// * Memory blocks returned from an allocator that are [*currently allocated*] must point to
98+
/// valid memory and retain their validity while they are [*currently allocated*] and at
99+
/// least one of the instance and all of its clones has not been dropped.
99100
///
100101
/// * copying, cloning, or moving the allocator must not invalidate memory blocks returned from this
101102
/// allocator. A copied or cloned allocator must behave like the same allocator, and

0 commit comments

Comments
 (0)