1 // revisions: edition2018 edition2021
2 // [edition2018] edition:2018
3 // [edition2021] edition:2021
6 #![warn(clippy::manual_assert)]
7 #![allow(dead_code, unused_doc_comments)]
8 #![allow(clippy::nonminimal_bool, clippy::uninlined_format_args)]
17 let a = vec![1, 2, 3];
29 panic!("qaqaq{:?}", a);
31 assert!(a.is_empty(), "qaqaq{:?}", a);
32 assert!(a.is_empty(), "qwqwq");
46 let b = vec![1, 2, 3];
47 assert!(!b.is_empty(), "panic1");
48 assert!(!(b.is_empty() && a.is_empty()), "panic2");
49 assert!(!(a.is_empty() && !b.is_empty()), "panic3");
50 assert!(!(b.is_empty() || a.is_empty()), "panic4");
51 assert!(!(a.is_empty() || !b.is_empty()), "panic5");
52 assert!(!a.is_empty(), "with expansion {}", one!());
56 // Suggestion should preserve comment
62 // comment after `panic!`
63 assert!(!(a > 2), "panic with comment");