mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-28 15:41:10 +00:00
29 lines
652 B
Text
29 lines
652 B
Text
error: only a `panic!` in `if`-then statement
|
|
--> $DIR/manual_assert.rs:31:5
|
|
|
|
|
LL | / if !a.is_empty() {
|
|
LL | | panic!("qaqaq{:?}", a);
|
|
LL | | }
|
|
| |_____^
|
|
|
|
|
= note: `-D clippy::manual-assert` implied by `-D warnings`
|
|
help: try instead
|
|
|
|
|
LL | assert!(a.is_empty(), "qaqaq{:?}", a);
|
|
|
|
|
|
|
error: only a `panic!` in `if`-then statement
|
|
--> $DIR/manual_assert.rs:66:5
|
|
|
|
|
LL | / if a.is_empty() {
|
|
LL | | panic!("with expansion {}", one!())
|
|
LL | | }
|
|
| |_____^
|
|
|
|
|
help: try instead
|
|
|
|
|
LL | assert!(!a.is_empty(), "with expansion {}", one!());
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|