diff options
author | Wedson Almeida Filho <wedsonaf@gmail.com> | 2022-12-28 06:03:46 +0000 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2023-01-16 23:48:06 +0100 |
commit | 0748424aba89811b85e6e0f958b8ccd47f5af47e (patch) | |
tree | 6ec2c6bbedcda88ba9db638df158a570feaf6925 /rust/kernel/lib.rs | |
parent | 70e42ebbf6416e8005d8e08ae521b7d5cc5a8b3a (diff) |
rust: sync: add support for dispatching on Arc and ArcBorrow.
Trait objects (`dyn T`) require trait `T` to be "object safe". One of
the requirements for "object safety" is that the receiver have one of
the allowed types. This commit adds `Arc<T>` and `ArcBorrow<'_, T>` to
the list of allowed types.
Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Acked-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel/lib.rs')
-rw-r--r-- | rust/kernel/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs index 4bde65e7b06b..e0b0e953907d 100644 --- a/rust/kernel/lib.rs +++ b/rust/kernel/lib.rs @@ -15,6 +15,7 @@ #![feature(allocator_api)] #![feature(coerce_unsized)] #![feature(core_ffi_c)] +#![feature(dispatch_from_dyn)] #![feature(receiver_trait)] #![feature(unsize)] |