Re: [PATCH] rust: Enable the new_uninit feature for kernel and driver crates

From: Martin Rodriguez Reboredo
Date: Fri Feb 24 2023 - 09:01:25 EST


On Fri, Feb 24, 2023 at 05:09:47PM +0900, Asahi Lina wrote:
> The unstable new_uninit feature enables various library APIs to create
> uninitialized containers, such as `Box::assume_init()`. This is
> necessary to build abstractions that directly initialize memory at the
> target location, instead of doing copies through the stack.
>
> Will be used by the DRM scheduler abstraction in the kernel crate, and
> by field-wise initialization (e.g. using `place!()` or a future
> replacement macro which may itself live in `kernel`) in driver crates.

Very useful to me as some constructors in the USB bindings that I'm
writting might make use of unitialized memory.

Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@xxxxxxxxx>