All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miguel Ojeda <ojeda@kernel.org>
To: stable@vger.kernel.org
Cc: gary@garyguo.net, Miguel Ojeda <ojeda@kernel.org>
Subject: [PATCH 6.12.y] rust: allow `clippy::collapsible_if` globally
Date: Tue, 12 May 2026 22:24:39 +0200	[thread overview]
Message-ID: <20260512202439.308523-1-ojeda@kernel.org> (raw)
In-Reply-To: <20260512201618.304954-1-ojeda@kernel.org>

Similar to `clippy::collapsible_match` (globally allowed in the previous
commit), the `clippy::collapsible_if` lint [1] can make code harder to
read in certain cases.

Thus just let developers decide on their own.

Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs).
Suggested-by: Gary Guo <gary@garyguo.net>
Link: https://lore.kernel.org/rust-for-linux/DGROP5CHU1QZ.1OKJRAUZXE9WC@garyguo.net/
Link: https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [1]
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260426144201.227108-2-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
(cherry picked from commit 2adc8664018c1cc595c7c0c98474a33c7fe32a85)
[ Removed Binder change. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
Greg/Sasha: I based this on the other one, i.e. this needs to be applied
after the one I am replying to.

 Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index 2c6b5339c471..fe352fdd6d7c 100644
--- a/Makefile
+++ b/Makefile
@@ -453,6 +453,7 @@ export rust_common_flags := --edition=2021 \
 			    -Wrust_2018_idioms \
 			    -Wunreachable_pub \
 			    -Wclippy::all \
+			    -Aclippy::collapsible_if \
 			    -Aclippy::collapsible_match \
 			    -Wclippy::ignored_unit_patterns \
 			    -Wclippy::mut_mut \
--
2.54.0

      reply	other threads:[~2026-05-12 20:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12 12:44 FAILED: patch "[PATCH] rust: allow `clippy::collapsible_match` globally" failed to apply to 6.12-stable tree gregkh
2026-05-12 20:16 ` [PATCH 6.12.y] rust: allow `clippy::collapsible_match` globally Miguel Ojeda
2026-05-12 20:24   ` Miguel Ojeda [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260512202439.308523-1-ojeda@kernel.org \
    --to=ojeda@kernel.org \
    --cc=gary@garyguo.net \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.