Re: [PATCH v3 07/13] rust: init: add `PinnedDrop` trait and macros

From: Alice Ryhl
Date: Thu Mar 30 2023 - 10:45:09 EST


On 3/30/23 00:33, y86-dev@xxxxxxxxxxxxxx wrote:
From: Benno Lossin <y86-dev@xxxxxxxxxxxxxx>

The `PinnedDrop` trait that facilitates destruction of pinned types.
It has to be implemented via the `#[pinned_drop]` macro, since the
`drop` function should not be called by normal code, only by other
destructors. It also only works on structs that are annotated with
`#[pin_data(PinnedDrop)]`.

Co-developed-by: Gary Guo <gary@xxxxxxxxxxx>
Signed-off-by: Gary Guo <gary@xxxxxxxxxxx>
Signed-off-by: Benno Lossin <y86-dev@xxxxxxxxxxxxxx>

Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>

I noticed the same thing as Gary with the name `create`, but otherwise LGTM.