]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/blocks_in_if_conditions_closure.rs
`assertions_on_result_states` fix suggestion when `assert!` not in a statement
[rust.git] / tests / ui / blocks_in_if_conditions_closure.rs
index 2856943b9be8001a31c172480e16d35e6580abd9..169589f6d4e7006044976d31c1d32085071ad9d1 100644 (file)
@@ -44,6 +44,14 @@ fn macro_in_closure() {
     }
 }
 
+fn closure(_: impl FnMut()) -> bool {
+    true
+}
+
+fn function_with_empty_closure() {
+    if closure(|| {}) {}
+}
+
 #[rustfmt::skip]
 fn main() {
     let mut range = 0..10;