• Sources: primary, discussion
  • Summary: PR #156882 merged on 2026-09-23, stabilising a subset of allocator_api under tracking issue #32838 and RFC #1398, with the remainder renamed allocator_ext. The stabilised surface is the unsafe Allocator trait with allocate and deallocate required and allocate_zeroed, grow, grow_zeroed, and shrink provided, plus the allocator parameter on Box<T, A> and Vec<T, A>, the Global and System allocators, and impls for references, Box, Rc, and Arc, with Allocator dyn-compatible, by_ref removed, and implementors now required not to unwind from any trait method or from drop. Two limits carry forward, since Box::into_pin is not yet available with custom allocators because of a variance soundness issue, handled for now by an unstable unsafe StaticAllocator marker trait, and the noalias hack on Box moves to an unstable NativeAllocator wrapper.
  • Why it matters: No-std, embedded, and Rust for Linux work has waited on a stable allocator parameter since RFC 1398.
  • Follow-up: Track which stable release carries this, because the change is merged to main and not yet in a release.

send feedback on this story