aboutsummaryrefslogtreecommitdiff
path: root/rust/compiler_builtins.rs
diff options
context:
space:
mode:
authorBenno Lossin <[email protected]>2023-06-30 15:03:23 +0000
committerMiguel Ojeda <[email protected]>2023-08-10 01:18:34 +0200
commit0b4e3b6f6b79b1add04008a6ceaaf661107e8902 (patch)
treeb02ce71b84124f5f6320d35d660fa5cda46a2622 /rust/compiler_builtins.rs
parent35cad617df2eeef8440a38e82bb2d81ae32ca50d (diff)
rust: types: make `Opaque` be `!Unpin`
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 <[email protected]> Reviewed-by: Gary Guo <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Andreas Hindborg <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/compiler_builtins.rs')
0 files changed, 0 insertions, 0 deletions