Re: [PATCH v2 01/20] kbuild: rust: allow `clippy::comparison_chain` globally
From: Miguel Ojeda
Date: Sun Oct 11 2026 - 05:40:22 EST
On Fri, Oct 9, 2026 at 10:12 AM Gary Guo <gary@xxxxxxxxxxx> wrote:
>
> The lint would suggest comparison chains to be converted to match on
> `Ordering` instead. The suggestions do not always produce more readable
> code, and also it can produce false-positive when not all ordering has a
> branch.
>
> The issue is known upstream and thus it has been downgraded from style
> lints to pedantic lints, which makes it allow-by-default since Rust 1.87.0.
> The current kernel MSRV is 1.85.0, and thus the lint still triggers; allow
> it globally to match the updated upstream behaviour.
>
> Acked-by: Benno Lossin <lossin@xxxxxxxxxx>
> Signed-off-by: Gary Guo <gary@xxxxxxxxxxx>
Acked-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
A couple links for context:
Link: https://rust-lang.zulipchat.com/#narrow/channel/257328-clippy/topic/demote.20some.20lints.20to.20.60pedantic.60
Link: https://rust-lang.github.io/rust-clippy/master/#comparison_chain
Cheers,
Miguel