]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/collapsible_if.fixed
Use macro source when creating `Sugg` helper
[rust.git] / tests / ui / collapsible_if.fixed
index 561283fc8e73de2b839d10dbf3d3fd22068d091c..6bb7682bae9530883c8035aa3ca0a1aebf5c5cbe 100644 (file)
@@ -1,5 +1,5 @@
 // run-rustfix
-#![allow(clippy::assertions_on_constants)]
+#![allow(clippy::assertions_on_constants, clippy::equatable_if_let)]
 
 #[rustfmt::skip]
 #[warn(clippy::collapsible_if)]
@@ -135,4 +135,17 @@ fn main() {
             if truth() {}
         }
     }
+
+    // Fix #5962
+    if matches!(true, true) && matches!(true, true) {}
+
+    // Issue #9375
+    if matches!(true, true) && truth() && matches!(true, true) {}
+
+    if true {
+        #[cfg(not(teehee))]
+        if true {
+            println!("Hello world!");
+        }
+    }
 }