Rollup merge of #154925 - zachs18:heap-into-array-with-alloc, r=Mark-Simulacrum
Make Box/Rc/Arc::into_array allocator-aware (and add doctest) Tracking issue for `alloc_slice_into_array`: https://github.com/rust-lang/rust/issues/148082 Tracking issue for `allocator_api`: https://github.com/rust-lang/rust/issues/32838 Make the `into_array` methods on `Box`, `Rc`, and `Arc` allocator-aware. I think the allocator-aware-ness should not be observable on stable, so these should not be additionally (comment-)gated behind `feature(allocator_api)`, just like e.g. `Box::leak` and `Vec::into_boxed_slice`. The added doctests do not use `feature(allocator_api)`. @rustbot label T-libs-api
J
Jonathan Brouwer committed
9a24dbf885dec59f0e9610599c678e9ce5ea4181
Committed by GitHub <noreply@github.com>
on 4/11/2026, 6:58:37 PM