]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: pin-init: replace clippy `expect` with `allow`
authorBenno Lossin <lossin@kernel.org>
Sun, 15 Feb 2026 13:22:30 +0000 (14:22 +0100)
committerMiguel Ojeda <ojeda@kernel.org>
Thu, 19 Feb 2026 08:33:43 +0000 (09:33 +0100)
commita58b8764aed9648357b1c5b6368c9943ba33b7f9
tree0a81fe8d161abcc3c77de2bd053253d2691eb5fa
parent621609f1e5ca43a75edd497dd1c28bd84aa66433
rust: pin-init: replace clippy `expect` with `allow`

`clippy` has changed behavior in [1] (Rust 1.95) where it no longer
warns about the `let_and_return` lint when a comment is placed between
the let binding and the return expression. Nightly thus fails to build,
because the expectation is no longer fulfilled.

Thus replace the expectation with an `allow`.

[ The errors were:

      error: this lint expectation is unfulfilled
          --> rust/pin-init/src/lib.rs:1279:10
           |
      1279 | #[expect(clippy::let_and_return)]
           |          ^^^^^^^^^^^^^^^^^^^^^^
           |
           = note: `-D unfulfilled-lint-expectations` implied by `-D warnings`
           = help: to override `-D warnings` add `#[allow(unfulfilled_lint_expectations)]`

      error: this lint expectation is unfulfilled
          --> rust/pin-init/src/lib.rs:1295:10
           |
      1295 | #[expect(clippy::let_and_return)]
           |          ^^^^^^^^^^^^^^^^^^^^^^

    - Miguel ]

Link: https://github.com/rust-lang/rust-clippy/pull/16461
Signed-off-by: Benno Lossin <lossin@kernel.org>
Cc: stable@vger.kernel.org # Needed in 6.18.y and later.
Link: https://patch.msgid.link/20260215132232.1549861-1-lossin@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/pin-init/src/lib.rs