@@ -473,11 +473,11 @@ where
473473{
474474}
475475
476- /// Marks that an allocator will behave as if it were `'static` , even if subtyped
477- /// with a shorter lifetime. This trivially applies to allocators that always maintain
478- /// global state, e.g. `System` or `Global`. Notably, the requirement means that
479- /// downstream consumers may rely on this allocator not invalidating its currently
480- /// allocated memory even if its lifetime has expired .
476+ /// Marks that an allocator will never invalidate currently allocated memory , even
477+ /// if its lifetime expires or a mutable reference to it is acquired. This trivially
478+ /// applies to allocators that always maintain global state, e.g. `System` or `Global`.
479+ /// Notably, this means that the only way for memory obtained from such an allocator
480+ /// to be invalidated is an explicit call to a de/reallocating method .
481481///
482482/// This is a necessity in conjunction with [`Pin`], as only `'static` allocators may
483483/// be used to back a pinned pointer.
@@ -641,6 +641,7 @@ unsafe impl<A: Allocator + ?Sized> DynAllocator for A {
641641// FIXME(nia-e): See if it's possible to make this built-in to the typesystem,
642642// e.g. by making the impl work on arbitrary `dyn DynAlloc + Foo + Bar`. Otherwise,
643643// just expand this macro with other trait combinations for now.
644+ // https://rust.tf/157506
644645
645646macro_rules! impl_dyn_allocator {
646647 ( $t: ty, $( $n: ty) ,+) => {
0 commit comments