[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72k2hDLf+PDkE6EQd7_UK2-XJYa3r2rVqDrjxARN7obT=A@mail.gmail.com>
Date: Sat, 12 Oct 2024 13:08:18 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Thomas Böhler <witcher@...edspace.de>
Cc: Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Jocelyn Falempe <jfalempe@...hat.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>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>, rust-for-linux@...r.kernel.org,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/7] drm/panic: allow verbose version check
On Sat, Oct 12, 2024 at 9:54 AM Thomas Böhler <witcher@...edspace.de> wrote:
>
> Clippy warns about a reimplementation of `RangeInclusive::contains`:
>
> error: manual `!RangeInclusive::contains` implementation
> --> drivers/gpu/drm/drm_panic_qr.rs:986:8
> |
> 986 | if version < 1 || version > 40 {
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(1..=40).contains(&version)`
> |
> = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
> = note: `-D clippy::manual-range-contains` implied by `-D warnings`
> = help: to override `-D warnings` add `#[allow(clippy::manual_range_contains)]`
>
> Ignore this and keep the current implementation as that makes it easier
> to read.
Yeah, I wonder if we may want to disable globally this one (and
possibly the previous one too) -- I am ambivalent.
> + #[allow(clippy::manual_range_contains)]
This (and the previous one) may be good candidates for `#[expect]`. We
don't have that yet in mainline, but it is in `rust-next`, so we can
clean it up next cycle.
Cheers,
Miguel
Powered by blists - more mailing lists