Re: [PATCH v3] rust: alloc: implement Box::pin_slice()

From: Danilo Krummrich
Date: Thu Aug 21 2025 - 10:57:42 EST


On Mon Aug 11, 2025 at 12:14 PM CEST, Vitaly Wool wrote:
> From: Alice Ryhl <aliceryhl@xxxxxxxxxx>
>
> Add a new constructor to Box to facilitate Box creation from a pinned
> slice of elements. This allows to efficiently allocate memory for e.g.
> slices of structrures containing spinlocks or mutexes. Such slices may
> be used in kmemcache like or zpool API implementations.
>
> Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
> Signed-off-by: Vitaly Wool <vitaly.wool@xxxxxxxxxxx>

Applied to alloc-next, thanks!

[ Add empty lines after struct definitions in the example; end sentences
with a period. - Danilo ]