Re: [PATCH] rust: remove unneeded `kernel::prelude` imports from doctests

From: Miguel Ojeda
Date: Sun May 05 2024 - 18:32:07 EST


On Fri, Apr 12, 2024 at 12:53 AM Nell Shamrell-Harrington
<nells@xxxxxxxxxxxxxxxxxxx> wrote:
>
> Rust doctests implicitly include `kernel::prelude::*`.
>
> Removes explicit `kernel::prelude` imports from doctests.
>
> Suggested-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
> Link: https://github.com/Rust-for-Linux/linux/issues/1064
> Signed-off-by: Nell Shamrell-Harrington <nells@xxxxxxxxxxxxxxxxxxx>

[ Add it back for `module_phy_driver`'s example since it is within a
`mod`, and thus it cannot be removed. - Miguel ]

Nell: please double-check the above is correct (I guess you didn't
enable net/phy and thus didn't notice since it didn't get compiled?).

Applied to `rust-next` -- thanks everyone!

Cheers,
Miguel