linux/rust/kernel
Wedson Almeida Filho f75cb6fce4 rust: sync: allow coercion from Arc<T> to Arc<U>
The coercion is only allowed if `U` is a compatible dynamically-sized
type (DST). For example, if we have some type `X` that implements trait
`Y`, then this allows `Arc<X>` to be coerced into `Arc<dyn Y>`.

Suggested-by: Gary Guo <gary@garyguo.net>
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>
2023-01-16 22:20:24 +01:00
..
sync rust: sync: allow coercion from Arc<T> to Arc<U> 2023-01-16 22:20:24 +01:00
allocator.rs rust: add kernel crate 2022-09-28 08:58:24 +02:00
build_assert.rs rust: build_assert: add build_{error,assert}! macros 2022-12-04 01:59:16 +01:00
error.rs rust: error: add From implementations for Error 2022-12-04 01:59:15 +01:00
lib.rs rust: sync: allow coercion from Arc<T> to Arc<U> 2023-01-16 22:20:24 +01:00
prelude.rs rust: build_assert: add build_{error,assert}! macros 2022-12-04 01:59:16 +01:00
print.rs rust: print: add pr_cont! macro 2022-12-01 20:12:44 +01:00
static_assert.rs rust: static_assert: add static_assert! macro 2022-12-04 01:59:16 +01:00
std_vendor.rs rust: std_vendor: add dbg! macro based on std's one 2022-12-04 01:59:16 +01:00
str.rs rust: str: add fmt! macro 2022-12-04 01:59:16 +01:00
sync.rs rust: sync: add Arc for ref-counted allocations 2023-01-16 22:20:03 +01:00
types.rs rust: types: add Opaque type 2022-12-04 01:59:16 +01:00