]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/manual_assert.edition2021.fixed
Use source callsite in FormatArgsExpn::inputs_span
[rust.git] / tests / ui / manual_assert.edition2021.fixed
index 6c2a25c37d8d73f6a1bd5960dbe8a8db954c91f7..d0bc640db88994c7c59312de4dfcb001aa984a78 100644 (file)
@@ -6,6 +6,12 @@
 #![warn(clippy::manual_assert)]
 #![allow(clippy::nonminimal_bool)]
 
+macro_rules! one {
+    () => {
+        1
+    };
+}
+
 fn main() {
     let a = vec![1, 2, 3];
     let c = Some(2);
@@ -42,4 +48,5 @@ fn main() {
     assert!(!(a.is_empty() && !b.is_empty()), "panic3");
     assert!(!(b.is_empty() || a.is_empty()), "panic4");
     assert!(!(a.is_empty() || !b.is_empty()), "panic5");
+    assert!(!a.is_empty(), "with expansion {}", one!());
 }