]> git.lizzy.rs Git - rust.git/blob - tests/ui/manual_assert.edition2021.stderr
Use source callsite in FormatArgsExpn::inputs_span
[rust.git] / tests / ui / manual_assert.edition2021.stderr
1 error: only a `panic!` in `if`-then statement
2   --> $DIR/manual_assert.rs:30:5
3    |
4 LL | /     if !a.is_empty() {
5 LL | |         panic!("qaqaq{:?}", a);
6 LL | |     }
7    | |_____^ help: try: `assert!(a.is_empty(), "qaqaq{:?}", a);`
8    |
9    = note: `-D clippy::manual-assert` implied by `-D warnings`
10
11 error: only a `panic!` in `if`-then statement
12   --> $DIR/manual_assert.rs:33:5
13    |
14 LL | /     if !a.is_empty() {
15 LL | |         panic!("qwqwq");
16 LL | |     }
17    | |_____^ help: try: `assert!(a.is_empty(), "qwqwq");`
18
19 error: only a `panic!` in `if`-then statement
20   --> $DIR/manual_assert.rs:50:5
21    |
22 LL | /     if b.is_empty() {
23 LL | |         panic!("panic1");
24 LL | |     }
25    | |_____^ help: try: `assert!(!b.is_empty(), "panic1");`
26
27 error: only a `panic!` in `if`-then statement
28   --> $DIR/manual_assert.rs:53:5
29    |
30 LL | /     if b.is_empty() && a.is_empty() {
31 LL | |         panic!("panic2");
32 LL | |     }
33    | |_____^ help: try: `assert!(!(b.is_empty() && a.is_empty()), "panic2");`
34
35 error: only a `panic!` in `if`-then statement
36   --> $DIR/manual_assert.rs:56:5
37    |
38 LL | /     if a.is_empty() && !b.is_empty() {
39 LL | |         panic!("panic3");
40 LL | |     }
41    | |_____^ help: try: `assert!(!(a.is_empty() && !b.is_empty()), "panic3");`
42
43 error: only a `panic!` in `if`-then statement
44   --> $DIR/manual_assert.rs:59:5
45    |
46 LL | /     if b.is_empty() || a.is_empty() {
47 LL | |         panic!("panic4");
48 LL | |     }
49    | |_____^ help: try: `assert!(!(b.is_empty() || a.is_empty()), "panic4");`
50
51 error: only a `panic!` in `if`-then statement
52   --> $DIR/manual_assert.rs:62:5
53    |
54 LL | /     if a.is_empty() || !b.is_empty() {
55 LL | |         panic!("panic5");
56 LL | |     }
57    | |_____^ help: try: `assert!(!(a.is_empty() || !b.is_empty()), "panic5");`
58
59 error: only a `panic!` in `if`-then statement
60   --> $DIR/manual_assert.rs:65:5
61    |
62 LL | /     if a.is_empty() {
63 LL | |         panic!("with expansion {}", one!())
64 LL | |     }
65    | |_____^ help: try: `assert!(!a.is_empty(), "with expansion {}", one!());`
66
67 error: aborting due to 8 previous errors
68