]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/collapsible_else_if.rs
Auto merge of #9684 - kraktus:ref_option_ref, r=xFrednet
[rust.git] / tests / ui / collapsible_else_if.rs
index bf6c1d1f894d7807a5c03a00b5e08f02f6ffa30c..4399fc8b2bd1d4b760828576d4d09055a6aaeabd 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)]
@@ -79,4 +79,22 @@ fn main() {
             println!("!")
         }
     }
+
+    if x == "hello" {
+        print!("Hello ");
+    } else {
+        #[cfg(not(roflol))]
+        if y == "world" {
+            println!("world!")
+        }
+    }
+}
+
+#[rustfmt::skip]
+#[allow(dead_code)]
+fn issue_7318() {
+    if true { println!("I've been resolved!")
+    }else{
+        if false {}
+    }
 }