Messages in this thread | ![/](/images/icornerl.gif) | | Date | Fri, 30 Jun 2023 17:32:53 +0200 | Subject | Re: [PATCH] rust: types: make `Opaque` be `!Unpin` | From | Alice Ryhl <> |
| |
On 6/30/23 17:03, Benno Lossin 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@proton.me>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
| ![\](/images/icornerr.gif) |