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`.
This commit is contained in:
Alejandra Gonzalez
2026-03-26 00:22:45 +01:00
parent b8ce22d75c
commit 1437b428ba
+5 -2
View File
@@ -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"
}