mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
21 lines
560 B
Text
21 lines
560 B
Text
|
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");`
|
||
|
|
||
|
error: aborting due to 2 previous errors
|
||
|
|