Re: [PATCH] rust: remove ignores for `clippy::new_ret_no_self`

From: Miguel Ojeda
Date: Sat Sep 23 2023 - 06:37:12 EST


On Sat, Sep 23, 2023 at 4:47 AM Gary Guo <gary@xxxxxxxxxxx> wrote:
>
> The clippy false positive triggering `new_ret_no_self` lint when using
> `pin_init!` macro is fixed in 1.67, so remove all `#[allow]`s ignoring
> the lint.

+1, thanks Gary, this is one I found thanks to the `#[expect]` series
I have to send. There are a couple others that I clean up there
(`non_send_fields_in_send_ty`, `dbg_macro`). Since you sent this one,
I will take your patch :)

If you don't mind, I will reword it a bit to add the couple links I had:

rust: kernel: remove `#[allow(clippy::new_ret_no_self)]`

Since Rust 1.67.0, Clippy's `new_ret_no_self` lint learnt to not
warn about `-> impl Trait<Self>` [1][2].

The kernel is nowadays on Rust 1.71.1, thus remove the `allow`.

Link: https://github.com/rust-lang/rust-clippy/issues/7344 [1]
Link: https://github.com/rust-lang/rust-clippy/pull/9733 [2]

Cheers,
Miguel