Re: [PATCH] rust: types: make `Opaque` be `!Unpin`

From: Miguel Ojeda
Date: Wed Aug 09 2023 - 19:22:04 EST


On Fri, Jun 30, 2023 at 5:03 PM Benno Lossin <benno.lossin@xxxxxxxxx> wrote:
>
> Adds a `PhantomPinned` field to `Opaque<T>`. This removes the last Rust
> guarantee: the assumption that the type `T` can be freely moved. This is
> not the case for many types from the C side (e.g. if they contain a
> `struct list_head`). This change removes the need to add a
> `PhantomPinned` field manually to Rust structs that contain C structs
> which must not be moved.
>
> Signed-off-by: Benno Lossin <benno.lossin@xxxxxxxxx>

Applied to `rust-next` -- thanks everyone!

Cheers,
Miguel