Re: [PATCH 3/3] samples: rust: remove imports available via prelude

From: Gary Guo

Date: Fri Jan 30 2026 - 09:26:10 EST


On Fri Jan 30, 2026 at 12:45 PM GMT, Dirk Behme wrote:
> On 27/01/2026 12:10, Miguel Ojeda wrote:
>> On Sat, Jan 24, 2026 at 6:08 AM Gary Guo <gary@xxxxxxxxxxx> wrote:
>>>
>>> These imports are already in scope by importing `kernel::prelude::*` and
>>> does not need to be imported separately.
>>>
>>> Signed-off-by: Gary Guo <gary@xxxxxxxxxxx>
>>
>> Applied (this one only) to `rust-next` -- thanks everyone!
>
> Having my klint setup running now (many thanks Gary!) on today's
> rust-next [1] I still get
>
> error: this item is available via prelude
> --> samples/rust/rust_driver_auxiliary.rs:12:5
> |
> 12 | error::Error,
> | ^^^^^^^^^^^^
> |
> = help: import with `kernel::prelude::*` instead
> = note: `-D klint::not-using-prelude` implied by `-D warnings`
> = help: to override `-D warnings` add
> `#[allow(klint::not_using_prelude)]`
>
> error: aborting due to 1 previous error
>
> Somehow dropping this was not part of this patch. Not sure why ...

It was already dropped in
https://lore.kernel.org/rust-for-linux/20260105142123.95030-1-dakr@xxxxxxxxxx/

Best,
Gary

>
> Best regards
>
> Dirk
>
> [1] HEAD is 08afcc38a64c ("Merge patch series "Add support for print
> exactly once"")