Skip to content

Commit 0f4296a

Browse files
authored
Rollup merge of #107916 - reez12g:issue-107040, r=Amanieu
fix comment on Allocator trait fixes rust-lang/rust#107040
2 parents 7f2aeea + 7cee309 commit 0f4296a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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)