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

Gary Guo gary at garyguo.net
Wed Apr 1 06:18:37 PDT 2026


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 at kernel.org>

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

> ---
>  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




More information about the linux-riscv mailing list