fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: only a `panic!` in `if`-then statement 2 --> $DIR/manual_assert.rs:30:5 3 | 4LL | / if !a.is_empty() { 5LL | | panic!("qaqaq{:?}", a); 6LL | | } 7 | |_____^ help: try instead: `assert!(a.is_empty(), "qaqaq{:?}", a);` 8 | 9 = note: `-D clippy::manual-assert` implied by `-D warnings` 10 = help: to override `-D warnings` add `#[allow(clippy::manual_assert)]` 11 12error: only a `panic!` in `if`-then statement 13 --> $DIR/manual_assert.rs:33:5 14 | 15LL | / if !a.is_empty() { 16LL | | panic!("qwqwq"); 17LL | | } 18 | |_____^ help: try instead: `assert!(a.is_empty(), "qwqwq");` 19 20error: only a `panic!` in `if`-then statement 21 --> $DIR/manual_assert.rs:50:5 22 | 23LL | / if b.is_empty() { 24LL | | panic!("panic1"); 25LL | | } 26 | |_____^ help: try instead: `assert!(!b.is_empty(), "panic1");` 27 28error: only a `panic!` in `if`-then statement 29 --> $DIR/manual_assert.rs:53:5 30 | 31LL | / if b.is_empty() && a.is_empty() { 32LL | | panic!("panic2"); 33LL | | } 34 | |_____^ help: try instead: `assert!(!(b.is_empty() && a.is_empty()), "panic2");` 35 36error: only a `panic!` in `if`-then statement 37 --> $DIR/manual_assert.rs:56:5 38 | 39LL | / if a.is_empty() && !b.is_empty() { 40LL | | panic!("panic3"); 41LL | | } 42 | |_____^ help: try instead: `assert!(!(a.is_empty() && !b.is_empty()), "panic3");` 43 44error: only a `panic!` in `if`-then statement 45 --> $DIR/manual_assert.rs:59:5 46 | 47LL | / if b.is_empty() || a.is_empty() { 48LL | | panic!("panic4"); 49LL | | } 50 | |_____^ help: try instead: `assert!(!(b.is_empty() || a.is_empty()), "panic4");` 51 52error: only a `panic!` in `if`-then statement 53 --> $DIR/manual_assert.rs:62:5 54 | 55LL | / if a.is_empty() || !b.is_empty() { 56LL | | panic!("panic5"); 57LL | | } 58 | |_____^ help: try instead: `assert!(!(a.is_empty() || !b.is_empty()), "panic5");` 59 60error: only a `panic!` in `if`-then statement 61 --> $DIR/manual_assert.rs:65:5 62 | 63LL | / if a.is_empty() { 64LL | | panic!("with expansion {}", one!()) 65LL | | } 66 | |_____^ help: try instead: `assert!(!a.is_empty(), "with expansion {}", one!());` 67 68error: only a `panic!` in `if`-then statement 69 --> $DIR/manual_assert.rs:77:5 70 | 71LL | / if a > 2 { 72LL | | // comment 73LL | | /* this is a 74LL | | multiline 75... | 76LL | | panic!("panic with comment") // comment after `panic!` 77LL | | } 78 | |_____^ 79 | 80help: try instead 81 | 82LL | assert!(!(a > 2), "panic with comment"); 83 | 84 85error: aborting due to 9 previous errors 86