1
1
error: only a `panic!` in `if`-then statement
2
- --> $DIR/manual_assert.rs:31 :5
2
+ --> $DIR/manual_assert.rs:30 :5
3
3
|
4
4
LL | / if !a.is_empty() {
5
5
LL | | panic!("qaqaq{:?}", a);
@@ -13,7 +13,7 @@ LL | assert!(a.is_empty(), "qaqaq{:?}", a);
13
13
|
14
14
15
15
error: only a `panic!` in `if`-then statement
16
- --> $DIR/manual_assert.rs:34 :5
16
+ --> $DIR/manual_assert.rs:33 :5
17
17
|
18
18
LL | / if !a.is_empty() {
19
19
LL | | panic!("qwqwq");
@@ -26,7 +26,7 @@ LL | assert!(a.is_empty(), "qwqwq");
26
26
|
27
27
28
28
error: only a `panic!` in `if`-then statement
29
- --> $DIR/manual_assert.rs:51 :5
29
+ --> $DIR/manual_assert.rs:50 :5
30
30
|
31
31
LL | / if b.is_empty() {
32
32
LL | | panic!("panic1");
@@ -39,7 +39,7 @@ LL | assert!(!b.is_empty(), "panic1");
39
39
|
40
40
41
41
error: only a `panic!` in `if`-then statement
42
- --> $DIR/manual_assert.rs:54 :5
42
+ --> $DIR/manual_assert.rs:53 :5
43
43
|
44
44
LL | / if b.is_empty() && a.is_empty() {
45
45
LL | | panic!("panic2");
@@ -52,7 +52,7 @@ LL | assert!(!(b.is_empty() && a.is_empty()), "panic2");
52
52
|
53
53
54
54
error: only a `panic!` in `if`-then statement
55
- --> $DIR/manual_assert.rs:57 :5
55
+ --> $DIR/manual_assert.rs:56 :5
56
56
|
57
57
LL | / if a.is_empty() && !b.is_empty() {
58
58
LL | | panic!("panic3");
@@ -65,7 +65,7 @@ LL | assert!(!(a.is_empty() && !b.is_empty()), "panic3");
65
65
|
66
66
67
67
error: only a `panic!` in `if`-then statement
68
- --> $DIR/manual_assert.rs:60 :5
68
+ --> $DIR/manual_assert.rs:59 :5
69
69
|
70
70
LL | / if b.is_empty() || a.is_empty() {
71
71
LL | | panic!("panic4");
@@ -78,7 +78,7 @@ LL | assert!(!(b.is_empty() || a.is_empty()), "panic4");
78
78
|
79
79
80
80
error: only a `panic!` in `if`-then statement
81
- --> $DIR/manual_assert.rs:63 :5
81
+ --> $DIR/manual_assert.rs:62 :5
82
82
|
83
83
LL | / if a.is_empty() || !b.is_empty() {
84
84
LL | | panic!("panic5");
@@ -91,7 +91,7 @@ LL | assert!(!(a.is_empty() || !b.is_empty()), "panic5");
91
91
|
92
92
93
93
error: only a `panic!` in `if`-then statement
94
- --> $DIR/manual_assert.rs:66 :5
94
+ --> $DIR/manual_assert.rs:65 :5
95
95
|
96
96
LL | / if a.is_empty() {
97
97
LL | | panic!("with expansion {}", one!())
@@ -104,9 +104,9 @@ LL | assert!(!a.is_empty(), "with expansion {}", one!());
104
104
|
105
105
106
106
error: only a `panic!` in `if`-then statement
107
- --> $DIR/manual_assert.rs:73 :5
107
+ --> $DIR/manual_assert.rs:72 :5
108
108
|
109
- LL | / if true {
109
+ LL | / if a > 2 {
110
110
LL | | // comment
111
111
LL | | /* this is a
112
112
LL | | multiline
@@ -117,7 +117,7 @@ LL | | }
117
117
|
118
118
help: try instead
119
119
|
120
- LL | assert!(!true , "panic with comment");
120
+ LL | assert!(!(a > 2) , "panic with comment");
121
121
|
122
122
123
123
error: aborting due to 9 previous errors
0 commit comments