Commit 85f8e98d authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Danilo Krummrich
Browse files

rust: alloc: allow coercion from `Box<T>` to `Box<dyn U>` if T implements U



This enables the creation of trait objects backed by a Box, similarly to
what can be done with the standard library.

Suggested-by: default avatarBenno Lossin <benno.lossin@proton.me>
Reviewed-by: default avatarAlice Ryhl <aliceryhl@google.com>
Reviewed-by: default avatarBenno Lossin <benno.lossin@proton.me>
Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Link: https://lore.kernel.org/r/20250412-box_trait_objs-v3-1-f67ced62d520@nvidia.com


Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
parent c3152988
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment