Re: [PATCH] rust: pin-init: replace clippy `expect` with `allow`
From: Miguel Ojeda
Date: Thu Feb 19 2026 - 03:37:35 EST
On 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>
Applied to `rust-fixes` -- thanks everyone!
Gary: I wasn't sure if you would have wanted me to pick your tag,
since it was conditional to adding the message, but we agreed to add
it later on. Just in case, I didn't add it to be on the safe side, but
I can add it.
By the way, I added:
Cc: stable@xxxxxxxxxxxxxxx # Needed in 6.18.y and later.
[ 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 ]
Cheers,
Miguel