From 1437b428bace04feff82f8e219af4b7ff85dd67c Mon Sep 17 00:00:00 2001 From: Alejandra Gonzalez Date: Thu, 26 Mar 2026 00:22:45 +0100 Subject: [PATCH] perf: disable `nonminimal_bool` by default After performance concers on the `nonminimal_bool` lint, we performed a crater run (rust-lang/rust issue number 153883). This crater run revealed that in 19120 suggestions taken from 1.3 million crates, only about 36% had resulted in multi-terminal suggestions (suggestions that were not only a single boolean). This suggests that most cases of this lint firing, the expression that triggered was pretty simple. And thus, we should not take such a huge toll for a lint that isn't that useful. changelog:[`nonminimal_bool`]: Move to `pedantic`. changelog:[`overly_complex_bool_expr`]: Move to `pedantic`. --- clippy_lints/src/booleans.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/booleans.rs b/clippy_lints/src/booleans.rs index 8b7619d11a83..986e75577412 100644 --- a/clippy_lints/src/booleans.rs +++ b/clippy_lints/src/booleans.rs @@ -30,6 +30,8 @@ /// Ignores short circuiting behavior of `||` and /// `&&`. Ignores `|`, `&` and `^`. /// + /// Creates a big toll on performance, **only enable sporadically** + /// /// ### Example /// ```ignore /// if a && true {} @@ -43,7 +45,7 @@ /// ``` #[clippy::version = "pre 1.29.0"] pub NONMINIMAL_BOOL, - complexity, + pedantic, "boolean expressions that can be written more concisely" } @@ -57,6 +59,7 @@ /// /// ### Known problems /// Ignores short circuiting behavior. + /// Creates a big toll on performance, **only enable sporadically** /// /// ### Example /// ```rust,ignore @@ -70,7 +73,7 @@ /// ``` #[clippy::version = "pre 1.29.0"] pub OVERLY_COMPLEX_BOOL_EXPR, - correctness, + pedantic, "boolean expressions that contain terminals which can be eliminated" }