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