about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-02-28 12:47:45 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2024-02-28 12:47:45 +0100
commitebf20954eefb949c0866d5ba6e1fb1cb357de99c (patch)
treea6daedd72a1f3b089d73b71c27391b257de33219
parent4c1d05cfa193012eb197119b4614dd979d7f6004 (diff)
downloadrust-ebf20954eefb949c0866d5ba6e1fb1cb357de99c.tar.gz
rust-ebf20954eefb949c0866d5ba6e1fb1cb357de99c.zip
Fix invalid condition in `nonminimal_bool` lint
-rw-r--r--clippy_lints/src/booleans.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/booleans.rs b/clippy_lints/src/booleans.rs
index 0d66f2d644d..614ddc41b15 100644
--- a/clippy_lints/src/booleans.rs
+++ b/clippy_lints/src/booleans.rs
@@ -148,8 +148,8 @@ fn check_inverted_bool_in_condition(
     right: &Expr<'_>,
 ) {
     if expr_span.from_expansion()
-        && (!cx.typeck_results().node_types()[left.hir_id].is_bool()
-            || !cx.typeck_results().node_types()[right.hir_id].is_bool())
+        || !cx.typeck_results().node_types()[left.hir_id].is_bool()
+        || !cx.typeck_results().node_types()[right.hir_id].is_bool()
     {
         return;
     }