]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rust: str: clean unused import for Rust >= 1.98
authorMiguel Ojeda <ojeda@kernel.org>
Tue, 9 Jun 2026 10:41:52 +0000 (12:41 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Wed, 10 Jun 2026 07:07:13 +0000 (09:07 +0200)
Starting with Rust 1.98.0 (expected 2026-08-20), the compiler has changed
how the resolution algorithm works [1] in upstream commit c4d84db5f184
("Resolver: Batched import resolution."), and it now spots:

    error: unused import: `flags::*`
     --> rust/kernel/str.rs:7:9
      |
    7 |         flags::*,
      |         ^^^^^^^^
      |
      = note: `-D unused-imports` implied by `-D warnings`
      = help: to override `-D warnings` add `#[allow(unused_imports)]`

It happens to not be needed because the `prelude::*` already provides
the flags.

Thus clean it up.

Cc: stable@vger.kernel.org # Needed in 6.18.y and later (prelude added to `str`).
Link: https://github.com/rust-lang/rust/pull/145108
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260609104152.261145-2-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/str.rs

index 4eae05e4baf95440d29f4c6e0ab7d6d1ffd9d551..b3caa9a1c898f40ffb362843363deac6109ea009 100644 (file)
@@ -4,7 +4,6 @@
 
 use crate::{
     alloc::{
-        flags::*,
         AllocError,
         KVec, //
     },