2021-09-14 08:28:09 +00:00
|
|
|
error: only a `panic!` in `if`-then statement
|
2022-10-02 13:25:50 +00:00
|
|
|
--> $DIR/manual_assert.rs:30:5
|
2021-09-14 08:28:09 +00:00
|
|
|
|
|
|
|
|
LL | / if !a.is_empty() {
|
|
|
|
LL | | panic!("qaqaq{:?}", a);
|
|
|
|
LL | | }
|
2022-09-14 09:58:41 +00:00
|
|
|
| |_____^
|
2021-09-14 08:28:09 +00:00
|
|
|
|
|
2021-10-12 14:23:05 +00:00
|
|
|
= note: `-D clippy::manual-assert` implied by `-D warnings`
|
2022-09-14 09:58:41 +00:00
|
|
|
help: try instead
|
|
|
|
|
|
2022-09-16 19:38:56 +00:00
|
|
|
LL | assert!(a.is_empty(), "qaqaq{:?}", a);
|
2022-09-14 09:58:41 +00:00
|
|
|
|
|
2021-09-14 08:28:09 +00:00
|
|
|
|
|
|
|
error: only a `panic!` in `if`-then statement
|
2022-10-02 13:25:50 +00:00
|
|
|
--> $DIR/manual_assert.rs:33:5
|
2021-09-14 08:28:09 +00:00
|
|
|
|
|
|
|
|
LL | / if !a.is_empty() {
|
|
|
|
LL | | panic!("qwqwq");
|
|
|
|
LL | | }
|
2022-09-14 09:58:41 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
help: try instead
|
|
|
|
|
|
2022-09-16 19:38:56 +00:00
|
|
|
LL | assert!(a.is_empty(), "qwqwq");
|
2022-09-14 09:58:41 +00:00
|
|
|
|
|
2021-09-14 08:28:09 +00:00
|
|
|
|
2021-09-30 11:06:42 +00:00
|
|
|
error: only a `panic!` in `if`-then statement
|
2022-10-02 13:25:50 +00:00
|
|
|
--> $DIR/manual_assert.rs:50:5
|
2021-09-30 11:06:42 +00:00
|
|
|
|
|
|
|
|
LL | / if b.is_empty() {
|
|
|
|
LL | | panic!("panic1");
|
|
|
|
LL | | }
|
2022-09-14 09:58:41 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
help: try instead
|
|
|
|
|
|
|
|
|
LL | assert!(!b.is_empty(), "panic1");
|
|
|
|
|
|
2021-09-30 11:06:42 +00:00
|
|
|
|
|
|
|
error: only a `panic!` in `if`-then statement
|
2022-10-02 13:25:50 +00:00
|
|
|
--> $DIR/manual_assert.rs:53:5
|
2021-09-30 11:06:42 +00:00
|
|
|
|
|
|
|
|
LL | / if b.is_empty() && a.is_empty() {
|
|
|
|
LL | | panic!("panic2");
|
|
|
|
LL | | }
|
2022-09-14 09:58:41 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
help: try instead
|
|
|
|
|
|
|
|
|
LL | assert!(!(b.is_empty() && a.is_empty()), "panic2");
|
|
|
|
|
|
2021-09-30 11:06:42 +00:00
|
|
|
|
|
|
|
error: only a `panic!` in `if`-then statement
|
2022-10-02 13:25:50 +00:00
|
|
|
--> $DIR/manual_assert.rs:56:5
|
2021-09-30 11:06:42 +00:00
|
|
|
|
|
|
|
|
LL | / if a.is_empty() && !b.is_empty() {
|
|
|
|
LL | | panic!("panic3");
|
|
|
|
LL | | }
|
2022-09-14 09:58:41 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
help: try instead
|
|
|
|
|
|
|
|
|
LL | assert!(!(a.is_empty() && !b.is_empty()), "panic3");
|
|
|
|
|
|
2021-09-30 11:06:42 +00:00
|
|
|
|
|
|
|
error: only a `panic!` in `if`-then statement
|
2022-10-02 13:25:50 +00:00
|
|
|
--> $DIR/manual_assert.rs:59:5
|
2021-09-30 11:06:42 +00:00
|
|
|
|
|
|
|
|
LL | / if b.is_empty() || a.is_empty() {
|
|
|
|
LL | | panic!("panic4");
|
|
|
|
LL | | }
|
2022-09-14 09:58:41 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
help: try instead
|
|
|
|
|
|
|
|
|
LL | assert!(!(b.is_empty() || a.is_empty()), "panic4");
|
|
|
|
|
|
2021-09-30 11:06:42 +00:00
|
|
|
|
|
|
|
error: only a `panic!` in `if`-then statement
|
2022-10-02 13:25:50 +00:00
|
|
|
--> $DIR/manual_assert.rs:62:5
|
2021-09-30 11:06:42 +00:00
|
|
|
|
|
|
|
|
LL | / if a.is_empty() || !b.is_empty() {
|
|
|
|
LL | | panic!("panic5");
|
|
|
|
LL | | }
|
2022-09-14 09:58:41 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
help: try instead
|
|
|
|
|
|
|
|
|
LL | assert!(!(a.is_empty() || !b.is_empty()), "panic5");
|
|
|
|
|
|
2021-09-30 11:06:42 +00:00
|
|
|
|
2022-01-28 14:42:19 +00:00
|
|
|
error: only a `panic!` in `if`-then statement
|
2022-10-02 13:25:50 +00:00
|
|
|
--> $DIR/manual_assert.rs:65:5
|
2022-01-28 14:42:19 +00:00
|
|
|
|
|
|
|
|
LL | / if a.is_empty() {
|
|
|
|
LL | | panic!("with expansion {}", one!())
|
|
|
|
LL | | }
|
2022-09-14 09:58:41 +00:00
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
help: try instead
|
|
|
|
|
|
|
|
|
LL | assert!(!a.is_empty(), "with expansion {}", one!());
|
|
|
|
|
|
|
|
|
|
|
|
|
error: only a `panic!` in `if`-then statement
|
2022-10-02 13:25:50 +00:00
|
|
|
--> $DIR/manual_assert.rs:72:5
|
2022-09-14 09:58:41 +00:00
|
|
|
|
|
2022-10-02 13:25:50 +00:00
|
|
|
LL | / if a > 2 {
|
2022-09-14 09:58:41 +00:00
|
|
|
LL | | // comment
|
|
|
|
LL | | /* this is a
|
|
|
|
LL | | multiline
|
|
|
|
... |
|
|
|
|
LL | | panic!("panic with comment") // comment after `panic!`
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
help: try instead
|
|
|
|
|
|
2022-10-02 13:25:50 +00:00
|
|
|
LL | assert!(!(a > 2), "panic with comment");
|
2022-09-14 09:58:41 +00:00
|
|
|
|
|
2022-01-28 14:42:19 +00:00
|
|
|
|
2022-09-14 09:58:41 +00:00
|
|
|
error: aborting due to 9 previous errors
|
2021-09-14 08:28:09 +00:00
|
|
|
|