Re: [RFC PATCH] rust: kbuild: support global per-version flags
From: Miguel Ojeda
Date: Sun Mar 15 2026 - 17:23:02 EST
On Sat, Mar 7, 2026 at 6:09 PM Miguel Ojeda <ojeda@xxxxxxxxxx> wrote:
>
> Sometimes it is useful to gate global Rust flags per compiler version.
> For instance, we may want to disable a lint that has false positives in
> a single version [1].
Regarding this, we currently have a warning on 1.85.1 for
`clippy::precedence` and a few in 1.88.0 for
`clippy::uninlined_format_args`, so we could use this to sort those
out (plus `clippy::double_parens` for 1.92.0).
(We will see how hard it is to keep all these versions clean in the
medium-term future when more Rust is in the kernel: we have the MSRV
bump cadence now with Debian Stable, so it may be doable, but worst
case we could consider relaxing the policy to just the latest stable
release and whatever linux-next runs).
Cheers,
Miguel