Re: [PATCH 05/33] rust: remove `RUSTC_HAS_COERCE_POINTEE` and simplify code

Gary Guo
2026-04-01T13:44:09Z

On Wed Apr 1, 2026 at 12:45 PM BST, Miguel Ojeda wrote:
> With the Rust version bump in place, the `RUSTC_HAS_COERCE_POINTEE`
> Kconfig (automatic) option is always true.
>
> Thus remove the option and simplify the code.
>
> In particular, this includes removing our use of the predecessor unstable
> features we used with Rust < 1.84.0 (`coerce_unsized`, `dispatch_from_dyn`
> and `unsize`).
>
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

Reviewed-by: Gary Guo <gary@garyguo.net>

> ---
> init/Kconfig | 3 ---
> rust/kernel/alloc/kbox.rs | 29 ++---------------------------
> rust/kernel/lib.rs | 8 +-------
> rust/kernel/list/arc.rs | 22 +---------------------
> rust/kernel/sync/arc.rs | 21 ++-------------------
> 5 files changed, 6 insertions(+), 77 deletions(-)