diff options
| author | LegionMammal978 <mattlloydhouse@gmail.com> | 2022-11-30 13:46:11 -0500 |
|---|---|---|
| committer | LegionMammal978 <mattlloydhouse@gmail.com> | 2022-11-30 13:51:31 -0500 |
| commit | 57e12f970cd97c65a7d1ce97989a778ffa102584 (patch) | |
| tree | f63e06b48c9b73262c3a54e7741583e7dd71f33c /library/core/src/alloc | |
| parent | 90711a86e5bdd4b0b65d293f0c2c48fd2db761b3 (diff) | |
| download | rust-57e12f970cd97c65a7d1ce97989a778ffa102584.tar.gz rust-57e12f970cd97c65a7d1ce97989a778ffa102584.zip | |
Clarify that copied allocators must behave the same
Diffstat (limited to 'library/core/src/alloc')
| -rw-r--r-- | library/core/src/alloc/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/core/src/alloc/mod.rs b/library/core/src/alloc/mod.rs index a6082455fac..ff390322d55 100644 --- a/library/core/src/alloc/mod.rs +++ b/library/core/src/alloc/mod.rs @@ -95,10 +95,10 @@ impl fmt::Display for AllocError { /// # Safety /// /// * Memory blocks returned from an allocator must point to valid memory and retain their validity -/// until the instance and all of its clones are dropped, +/// until the instance and all of its copies and clones are dropped, /// -/// * cloning or moving the allocator must not invalidate memory blocks returned from this -/// allocator. A cloned allocator must behave like the same allocator, and +/// * copying, cloning, or moving the allocator must not invalidate memory blocks returned from this +/// allocator. A copied or cloned allocator must behave like the same allocator, and /// /// * any pointer to a memory block which is [*currently allocated*] may be passed to any other /// method of the allocator. |
