2021-09-14 08:28:09 +00:00
|
|
|
error: only a `panic!` in `if`-then statement
|
|
|
|
--> $DIR/if_then_panic.rs:19:5
|
|
|
|
|
|
|
|
|
LL | / if !a.is_empty() {
|
|
|
|
LL | | panic!("qaqaq{:?}", a);
|
|
|
|
LL | | }
|
|
|
|
| |_____^ help: try: `assert!(a.is_empty(), "qaqaq{:?}", a);`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::if-then-panic` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: only a `panic!` in `if`-then statement
|
|
|
|
--> $DIR/if_then_panic.rs:22:5
|
|
|
|
|
|
|
|
|
LL | / if !a.is_empty() {
|
|
|
|
LL | | panic!("qwqwq");
|
|
|
|
LL | | }
|
|
|
|
| |_____^ help: try: `assert!(a.is_empty(), "qwqwq");`
|
|
|
|
|
2021-09-30 11:06:42 +00:00
|
|
|
error: only a `panic!` in `if`-then statement
|
|
|
|
--> $DIR/if_then_panic.rs:39:5
|
|
|
|
|
|
|
|
|
LL | / if b.is_empty() {
|
|
|
|
LL | | panic!("panic1");
|
|
|
|
LL | | }
|
|
|
|
| |_____^ help: try: `assert!(!b.is_empty(), "panic1");`
|
|
|
|
|
|
|
|
error: only a `panic!` in `if`-then statement
|
|
|
|
--> $DIR/if_then_panic.rs:42:5
|
|
|
|
|
|
|
|
|
LL | / if b.is_empty() && a.is_empty() {
|
|
|
|
LL | | panic!("panic2");
|
|
|
|
LL | | }
|
2021-10-01 05:13:09 +00:00
|
|
|
| |_____^ help: try: `assert!(!(b.is_empty() && a.is_empty()), "panic2");`
|
2021-09-30 11:06:42 +00:00
|
|
|
|
|
|
|
error: only a `panic!` in `if`-then statement
|
|
|
|
--> $DIR/if_then_panic.rs:45:5
|
|
|
|
|
|
|
|
|
LL | / if a.is_empty() && !b.is_empty() {
|
|
|
|
LL | | panic!("panic3");
|
|
|
|
LL | | }
|
2021-10-01 05:13:09 +00:00
|
|
|
| |_____^ help: try: `assert!(!(a.is_empty() && !b.is_empty()), "panic3");`
|
2021-09-30 11:06:42 +00:00
|
|
|
|
|
|
|
error: only a `panic!` in `if`-then statement
|
|
|
|
--> $DIR/if_then_panic.rs:48:5
|
|
|
|
|
|
|
|
|
LL | / if b.is_empty() || a.is_empty() {
|
|
|
|
LL | | panic!("panic4");
|
|
|
|
LL | | }
|
2021-10-01 05:13:09 +00:00
|
|
|
| |_____^ help: try: `assert!(!(b.is_empty() || a.is_empty()), "panic4");`
|
2021-09-30 11:06:42 +00:00
|
|
|
|
|
|
|
error: only a `panic!` in `if`-then statement
|
|
|
|
--> $DIR/if_then_panic.rs:51:5
|
|
|
|
|
|
|
|
|
LL | / if a.is_empty() || !b.is_empty() {
|
|
|
|
LL | | panic!("panic5");
|
|
|
|
LL | | }
|
2021-10-01 05:13:09 +00:00
|
|
|
| |_____^ help: try: `assert!(!(a.is_empty() || !b.is_empty()), "panic5");`
|
2021-09-30 11:06:42 +00:00
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
2021-09-14 08:28:09 +00:00
|
|
|
|