[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72kY9DA_JD_XkF01ZSmXbD8iaFthVZ66X+9N5aa_WObt+A@mail.gmail.com>
Date: Sat, 28 Jun 2025 14:18:53 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Onur <work@...rozkan.dev>, viresh.kumar@...aro.org
Cc: rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, linux-kselftest@...r.kernel.org,
kunit-dev@...glegroups.com, airlied@...il.com, simona@...ll.ch,
ojeda@...nel.org, alex.gaynor@...il.com, boqun.feng@...il.com,
gary@...yguo.net, bjorn3_gh@...tonmail.com, lossin@...nel.org,
a.hindborg@...nel.org, aliceryhl@...gle.com, tmgross@...ch.edu,
rafael@...nel.org, gregkh@...uxfoundation.org,
maarten.lankhorst@...ux.intel.com, mripard@...nel.org, tzimmermann@...e.de,
davidgow@...gle.com, nm@...com
Subject: Re: [PATCH v3 3/3] rust: remove `#[allow(clippy::non_send_fields_in_send_ty)]`
On Sat, Jun 28, 2025 at 12:30 PM Onur <work@...rozkan.dev> wrote:
>
> It doesn't seem to be the same reason. I rebased over
> c6af9a1191d042839e56abff69e8b0302d117988 (the exact commit where that
> lint was added) but still Clippy did not complain about it on the
> MSRV. So it was either a leftover, or there is a version between
> 1.78 and the current stable where Clippy did complain. I can dig into it
> more during the week if you would like.
Are you sure? The lint is actually disabled, as I mention in 5e7c9b84ad08.
>From a quick test, I enabled it in that file, and I get the warning.
Thus it seems to me Clippy would still complain about it just fine.
It doesn't mean we shouldn't remove it, though.
> IMO, we should require people to add a comment explaining the reason
> for adding these lint rules to the codebase. It would make both reading
> and modifying the code much simpler and clearer.
Do you mean using the lint reasons feature? IIRC we discussed at some
point doing that when the feature was added (we enabled it for the
`expect` side of things).
For non-obvious cases or uncommon lints, it would be definitely nice
(a comment is also OK). I am not sure if it is worth enforcing it for
every single case, though.
It would be nice if `clippy::allow_attributes_without_reason` could be
enabled just for `allow`, or ignore it for certain lints.
Cheers,
Miguel
Powered by blists - more mailing lists