@@ -4,104 +4,65 @@ error: only a `panic!` in `if`-then statement
44LL | / if !a.is_empty() {
55LL | | panic!("qaqaq{:?}", a);
66LL | | }
7- | |_____^
7+ | |_____^ help: try instead: `assert!(a.is_empty(), "qaqaq{:?}", a);`
88 |
99 = note: `-D clippy::manual-assert` implied by `-D warnings`
10- help: try instead
11- |
12- LL | assert!(a.is_empty(), "qaqaq{:?}", a);
13- |
1410
1511error: only a `panic!` in `if`-then statement
1612 --> $DIR/manual_assert.rs:34:5
1713 |
1814LL | / if !a.is_empty() {
1915LL | | panic!("qwqwq");
2016LL | | }
21- | |_____^
22- |
23- help: try instead
24- |
25- LL | assert!(a.is_empty(), "qwqwq");
26- |
17+ | |_____^ help: try instead: `assert!(a.is_empty(), "qwqwq");`
2718
2819error: only a `panic!` in `if`-then statement
2920 --> $DIR/manual_assert.rs:51:5
3021 |
3122LL | / if b.is_empty() {
3223LL | | panic!("panic1");
3324LL | | }
34- | |_____^
35- |
36- help: try instead
37- |
38- LL | assert!(!b.is_empty(), "panic1");
39- |
25+ | |_____^ help: try instead: `assert!(!b.is_empty(), "panic1");`
4026
4127error: only a `panic!` in `if`-then statement
4228 --> $DIR/manual_assert.rs:54:5
4329 |
4430LL | / if b.is_empty() && a.is_empty() {
4531LL | | panic!("panic2");
4632LL | | }
47- | |_____^
48- |
49- help: try instead
50- |
51- LL | assert!(!(b.is_empty() && a.is_empty()), "panic2");
52- |
33+ | |_____^ help: try instead: `assert!(!(b.is_empty() && a.is_empty()), "panic2");`
5334
5435error: only a `panic!` in `if`-then statement
5536 --> $DIR/manual_assert.rs:57:5
5637 |
5738LL | / if a.is_empty() && !b.is_empty() {
5839LL | | panic!("panic3");
5940LL | | }
60- | |_____^
61- |
62- help: try instead
63- |
64- LL | assert!(!(a.is_empty() && !b.is_empty()), "panic3");
65- |
41+ | |_____^ help: try instead: `assert!(!(a.is_empty() && !b.is_empty()), "panic3");`
6642
6743error: only a `panic!` in `if`-then statement
6844 --> $DIR/manual_assert.rs:60:5
6945 |
7046LL | / if b.is_empty() || a.is_empty() {
7147LL | | panic!("panic4");
7248LL | | }
73- | |_____^
74- |
75- help: try instead
76- |
77- LL | assert!(!(b.is_empty() || a.is_empty()), "panic4");
78- |
49+ | |_____^ help: try instead: `assert!(!(b.is_empty() || a.is_empty()), "panic4");`
7950
8051error: only a `panic!` in `if`-then statement
8152 --> $DIR/manual_assert.rs:63:5
8253 |
8354LL | / if a.is_empty() || !b.is_empty() {
8455LL | | panic!("panic5");
8556LL | | }
86- | |_____^
87- |
88- help: try instead
89- |
90- LL | assert!(!(a.is_empty() || !b.is_empty()), "panic5");
91- |
57+ | |_____^ help: try instead: `assert!(!(a.is_empty() || !b.is_empty()), "panic5");`
9258
9359error: only a `panic!` in `if`-then statement
9460 --> $DIR/manual_assert.rs:66:5
9561 |
9662LL | / if a.is_empty() {
9763LL | | panic!("with expansion {}", one!())
9864LL | | }
99- | |_____^
100- |
101- help: try instead
102- |
103- LL | assert!(!a.is_empty(), "with expansion {}", one!());
104- |
65+ | |_____^ help: try instead: `assert!(!a.is_empty(), "with expansion {}", one!());`
10566
10667error: only a `panic!` in `if`-then statement
10768 --> $DIR/manual_assert.rs:73:5
0 commit comments