Re: [PATCH] rust: pin-init: replace clippy `expect` with `allow`
From: Miguel Ojeda
Date: Mon Feb 16 2026 - 09:28:43 EST
As we discaOn Sun, Feb 15, 2026 at 2:22 PM Benno Lossin
<lossin@xxxxxxxxxx> wrote:
>
> `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`.
>
> Link: https://github.com/rust-lang/rust-clippy/pull/16461 [1]
> Signed-off-by: Benno Lossin <lossin@xxxxxxxxxx>
Thanks for figuring out the PR upstream, that is always helpful -- I
also noticed it in the 2026-02-13 nightly, so this saved me having to
dig into it.
If you want, when you decide it is ready, I can take it into rust-fixes.
By the way, if you send a new version, please include the error -- it
makes it easier for others to find it later in lore.kernel.org. In
case you don't have it around, this is what I got in that run from a
few days ago:
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)]
| ^^^^^^^^^^^^^^^^^^^^^^
Cheers,
Miguel