]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/manual_assert.rs
Add size_of_ref lint
[rust.git] / tests / ui / manual_assert.rs
index 8c37753071dfb9b393d0183b2e3ebbd8b475fbe3..f037c5b8405c721cc6755b1874cf5d47f229206b 100644 (file)
@@ -1,6 +1,6 @@
 // revisions: edition2018 edition2021
-// [edition2018] edition:2018
-// [edition2021] edition:2021
+//[edition2018] edition:2018
+//[edition2021] edition:2021
 // run-rustfix
 
 #![warn(clippy::manual_assert)]
@@ -66,6 +66,11 @@ fn main() {
     if a.is_empty() {
         panic!("with expansion {}", one!())
     }
+    if a.is_empty() {
+        let _ = 0;
+    } else if a.len() == 1 {
+        panic!("panic6");
+    }
 }
 
 fn issue7730(a: u8) {