lkml.org 
[lkml]   [2024]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/3] rust: kernel: remove redundant imports
On Mon, Apr 1, 2024 at 11:23 PM Miguel Ojeda <ojeda@kernel.org> wrote:
>
> Rust's `unused_imports` lint covers both unused and redundant imports.
> In the upcoming 1.78.0, the lint detects more cases of redundant imports
> [1], e.g.:
>
> error: the item `bindings` is imported redundantly
> --> rust/kernel/print.rs:38:9
> |
> 38 | use crate::bindings;
> | ^^^^^^^^^^^^^^^ the item `bindings` is already defined by prelude
>
> Most cases are `use crate::bindings`, plus a few other items like `Box`.
> Thus clean them up.
>
> Note that, in the `bindings` case, the message "defined by prelude"
> above means the extern prelude, i.e. the `--extern` flags we pass.
>
> Link: https://github.com/rust-lang/rust/pull/117772 [1]
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

Reviewed-by: Alice Ryhl <aliceryhl@google.com>

\
 
 \ /
  Last update: 2024-05-27 16:19    [W:0.066 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site