Re: [PATCH v6 00/15] Rust pin-init API for pinned initialization of structs

From: Boqun Feng
Date: Wed Apr 05 2023 - 17:03:31 EST


On Wed, Apr 05, 2023 at 07:35:30PM +0000, Benno Lossin wrote:
> Changelog:
> v5 -> v6:
> - Change `pinned_drop` macro to allow `mut self` in the signature.
> - Change statement fragment to tt fragemnt in `pinned_drop` to prevent
> parsing errors.
> - Move evaluation of the value in `stack_pin_init!`/`stack_try_pin_init!`
> to the beginning.

Could you elaborate why? To make sure the $val evaluation happens
unconditionally?

> - Move setting uninitialized flag in front of dropping the value in
> `StackInit::init`.
> - Remove `Unpin` requirement on `zeroed()`.
> - Add note about `Pointee` to the `Zeroable` impl on raw pointers.
>

Regards,
Boqun