]>
git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/manual_assert.rs
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
);
32 panic
!("qaqaq{:?}", a
);
50 let b
= vec
![1, 2, 3];
54 if b
.is_empty() && a
.is_empty() {
57 if a
.is_empty() && !b
.is_empty() {
60 if b
.is_empty() || a
.is_empty() {
63 if a
.is_empty() || !b
.is_empty() {
67 panic
!("with expansion {}", one
!())
71 } else if a
.len() == 1 {
77 // Suggestion should preserve comment
84 panic
!("panic with comment") // comment after `panic!`