]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/collapsible_if.rs
Auto merge of #9684 - kraktus:ref_option_ref, r=xFrednet
[rust.git] / tests / ui / collapsible_if.rs
index 657f32d38a32bc1a3714c8de089e6ade5a52c628..e216a9ee54c90ee959415569eb612f1a8010dfb9 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)]
@@ -154,4 +154,16 @@ fn truth() -> bool { true }
     if matches!(true, true) {
         if matches!(true, true) {}
     }
+
+    // Issue #9375
+    if matches!(true, true) && truth() {
+        if matches!(true, true) {}
+    }
+
+    if true {
+        #[cfg(not(teehee))]
+        if true {
+            println!("Hello world!");
+        }
+    }
 }