Re: [PATCH 04/33] rust: remove `RUSTC_HAS_SLICE_AS_FLATTENED` and simplify code

From: Gary Guo

Date: Wed Apr 01 2026 - 09:26:45 EST


On Wed Apr 1, 2026 at 12:45 PM BST, Miguel Ojeda wrote:
> With the Rust version bump in place, the `RUSTC_HAS_SLICE_AS_FLATTENED`
> Kconfig (automatic) option is always true.
>
> Thus remove the option and simplify the code.
>
> In particular, this includes removing the `slice` module which contained
> the temporary slice helpers, i.e. the `AsFlattened` extension trait and
> its `impl`s.
>
> Signed-off-by: Miguel Ojeda <ojeda@xxxxxxxxxx>

Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>

> ---
> init/Kconfig | 3 ---
> rust/kernel/lib.rs | 1 -
> rust/kernel/prelude.rs | 3 ---
> rust/kernel/slice.rs | 49 ------------------------------------------
> 4 files changed, 56 deletions(-)
> delete mode 100644 rust/kernel/slice.rs