2017-02-07 21:05:30 +01:00
|
|
|
error: item `PubOne` has a public `len` method but no corresponding `is_empty` method
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:8:1
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
8 | / impl PubOne {
|
|
|
|
9 | | pub fn len(self: &Self) -> isize {
|
|
|
|
10 | | 1
|
|
|
|
11 | | }
|
|
|
|
12 | | }
|
2017-04-23 15:25:22 +02:00
|
|
|
| |_^
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
= note: `-D clippy::len-without-is-empty` implied by `-D warnings`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
2017-08-28 23:13:56 +02:00
|
|
|
error: trait `PubTraitsToo` has a `len` method but no (possibly inherited) `is_empty` method
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:57:1
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
57 | / pub trait PubTraitsToo {
|
|
|
|
58 | | fn len(self: &Self) -> isize;
|
|
|
|
59 | | }
|
2017-04-23 15:25:22 +02:00
|
|
|
| |_^
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: item `HasIsEmpty` has a public `len` method but a private `is_empty` method
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:91:1
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
91 | / impl HasIsEmpty {
|
|
|
|
92 | | pub fn len(self: &Self) -> isize {
|
|
|
|
93 | | 1
|
|
|
|
94 | | }
|
2017-04-10 15:36:07 +02:00
|
|
|
... |
|
2018-08-01 16:30:44 +02:00
|
|
|
98 | | }
|
|
|
|
99 | | }
|
2017-04-23 15:25:22 +02:00
|
|
|
| |_^
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: item `HasWrongIsEmpty` has a public `len` method but no corresponding `is_empty` method
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:120:1
|
2017-02-19 16:14:30 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
120 | / impl HasWrongIsEmpty {
|
|
|
|
121 | | pub fn len(self: &Self) -> isize {
|
|
|
|
122 | | 1
|
|
|
|
123 | | }
|
2017-04-10 15:36:07 +02:00
|
|
|
... |
|
2018-08-01 16:30:44 +02:00
|
|
|
127 | | }
|
|
|
|
128 | | }
|
2017-04-23 15:25:22 +02:00
|
|
|
| |_^
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: length comparison to zero
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:141:8
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
141 | if x.len() == 0 {
|
2017-07-24 16:28:41 +02:00
|
|
|
| ^^^^^^^^^^^^ help: using `is_empty` is more concise: `x.is_empty()`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
= note: `-D clippy::len-zero` implied by `-D warnings`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: length comparison to zero
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:145:8
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
145 | if "".len() == 0 {}
|
2017-07-24 16:28:41 +02:00
|
|
|
| ^^^^^^^^^^^^^ help: using `is_empty` is more concise: `"".is_empty()`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: length comparison to zero
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:160:8
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
160 | if has_is_empty.len() == 0 {
|
2017-07-24 16:28:41 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: length comparison to zero
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:163:8
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
163 | if has_is_empty.len() != 0 {
|
2017-07-24 16:28:41 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: length comparison to zero
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:166:8
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
166 | if has_is_empty.len() > 0 {
|
2017-07-24 16:28:41 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
2018-05-05 15:01:51 +02:00
|
|
|
error: length comparison to one
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:169:8
|
2018-05-05 15:01:51 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
169 | if has_is_empty.len() < 1 {
|
2018-05-05 15:01:51 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()`
|
|
|
|
|
|
|
|
error: length comparison to one
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:172:8
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
172 | if has_is_empty.len() >= 1 {
|
2018-05-05 15:01:51 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
|
|
|
|
|
|
|
|
error: length comparison to zero
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:183:8
|
2018-05-05 15:01:51 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
183 | if 0 == has_is_empty.len() {
|
2018-05-05 15:01:51 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()`
|
|
|
|
|
|
|
|
error: length comparison to zero
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:186:8
|
2018-05-05 15:01:51 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
186 | if 0 != has_is_empty.len() {
|
2018-05-05 15:01:51 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
|
|
|
|
|
|
|
|
error: length comparison to zero
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:189:8
|
2018-05-05 15:01:51 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
189 | if 0 < has_is_empty.len() {
|
2018-05-05 15:01:51 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
|
|
|
|
|
|
|
|
error: length comparison to one
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:192:8
|
2018-05-05 15:01:51 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
192 | if 1 <= has_is_empty.len() {
|
2018-05-05 15:01:51 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
|
|
|
|
|
|
|
|
error: length comparison to one
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:195:8
|
2018-05-05 15:01:51 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
195 | if 1 > has_is_empty.len() {
|
2018-05-05 15:01:51 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()`
|
|
|
|
|
|
|
|
error: length comparison to zero
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:209:8
|
2018-05-05 15:01:51 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
209 | if with_is_empty.len() == 0 {
|
2017-07-24 16:28:41 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `with_is_empty.is_empty()`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
2017-02-25 04:26:33 +01:00
|
|
|
error: length comparison to zero
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:222:8
|
2017-02-25 04:26:33 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
222 | if b.len() != 0 {}
|
2017-07-24 16:28:41 +02:00
|
|
|
| ^^^^^^^^^^^^ help: using `is_empty` is more concise: `!b.is_empty()`
|
2017-02-25 04:26:33 +01:00
|
|
|
|
2017-09-04 17:05:47 +02:00
|
|
|
error: trait `DependsOnFoo` has a `len` method but no (possibly inherited) `is_empty` method
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/len_zero.rs:228:1
|
2017-09-04 17:05:47 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
228 | / pub trait DependsOnFoo: Foo {
|
|
|
|
229 | | fn len(&mut self) -> usize;
|
|
|
|
230 | | }
|
2017-09-04 17:05:47 +02:00
|
|
|
| |_^
|
|
|
|
|
2018-05-05 15:01:51 +02:00
|
|
|
error: aborting due to 19 previous errors
|
2018-01-16 17:06:27 +01:00
|
|
|
|