Re: [PATCH] rust: cpufreq: fix clippy::double_parens warning in Policy doctest
From: Miguel Ojeda
Date: Fri Mar 06 2026 - 07:37:02 EST
On Thu, Mar 5, 2026 at 1:32 PM Gary Guo <gary@xxxxxxxxxxx> wrote:
>
> I think we should either disable with
>
> #[allow(clippy::double_parens, reason = "false positive before 1.92")]
> fn update_policy(policy: &mut Policy) {
>
> or disable it globally for all Rust code before 1.92.
>
> Miguel, which one do you think is better?
Hmm... Disabling globally for all versions could also be an option --
not having this lint doesn't sound like a big deal, I think.
I guess it depends on how prevalent it is, i.e. how much we expect to
hit it for the 1.5 years or so (since we will eventually bump above it
anyway).
Or do you think the lint is very valuable?
Doing it globally for certain versions (i.e. `rust_common_flags`, not
just `KBUILD_RUSTFLAGS`) requires a bit of reorganization, so for
simplicity here in this series I would suggest a local `allow`, and
then we can see later on how prevalent it is to decide whether to do
it locally (whether per version or not).
I hope that helps.
Cheers,
Miguel