lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAH5fLggkQ-z97O94Am=h8ObJZnC5M4PtWceu9MJfNw5pim=hTA@mail.gmail.com>
Date: Mon, 14 Oct 2024 14:14:46 +0200
From: Alice Ryhl <aliceryhl@...gle.com>
To: Miguel Ojeda <ojeda@...nel.org>
Cc: Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>, 
	Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>, 
	Benno Lossin <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>, 
	Trevor Gross <tmgross@...ch.edu>, rust-for-linux@...r.kernel.org, 
	linux-kernel@...r.kernel.org, patches@...ts.linux.dev
Subject: Re: [RFC PATCH] rust: kernel: clean explicit lifetimes that can be elided

On Sun, Oct 13, 2024 at 1:13 AM Miguel Ojeda <ojeda@...nel.org> wrote:
>
> In nightly Clippy (i.e. Rust 1.83.0), the `needless_lifetimes` lint has
> been extended [1] to suggest eliding `impl` lifetimes, e.g.
>
>     error: the following explicit lifetimes could be elided: 'a
>     --> rust/kernel/list.rs:647:6
>         |
>     647 | impl<'a, T: ?Sized + ListItem<ID>, const ID: u64> FusedIterator for Iter<'a, T, ID> {}
>         |      ^^                                                                  ^^
>         |
>         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
>         = note: `-D clippy::needless-lifetimes` implied by `-D warnings`
>         = help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
>     help: elide the lifetimes
>         |
>     647 - impl<'a, T: ?Sized + ListItem<ID>, const ID: u64> FusedIterator for Iter<'a, T, ID> {}
>     647 + impl<T: ?Sized + ListItem<ID>, const ID: u64> FusedIterator for Iter<'_, T, ID> {}
>
> Thus clean them.
>
> Link: https://github.com/rust-lang/rust-clippy/pull/13286 [1]
> Signed-off-by: Miguel Ojeda <ojeda@...nel.org>
> ---
> Do we want this in general, or just in some cases? There is an issue about this
> where we may want to leave some feedback:
>
>     https://github.com/rust-lang/rust-clippy/issues/13514

If this lint lands for real, then this change LGTM:

Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>

However, I don't think the lint is useful. I would rather that we are
able to allow this lint.

Alice

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ