error: item `PubOne` has a public `len` method but no corresponding `is_empty` method --> $DIR/len_zero.rs:8:1 | 8 | / impl PubOne { 9 | | pub fn len(self: &Self) -> isize { 10 | | 1 11 | | } 12 | | } | |_^ | = note: `-D clippy::len-without-is-empty` implied by `-D warnings` error: trait `PubTraitsToo` has a `len` method but no (possibly inherited) `is_empty` method --> $DIR/len_zero.rs:57:1 | 57 | / pub trait PubTraitsToo { 58 | | fn len(self: &Self) -> isize; 59 | | } | |_^ error: item `HasIsEmpty` has a public `len` method but a private `is_empty` method --> $DIR/len_zero.rs:91:1 | 91 | / impl HasIsEmpty { 92 | | pub fn len(self: &Self) -> isize { 93 | | 1 94 | | } ... | 98 | | } 99 | | } | |_^ error: item `HasWrongIsEmpty` has a public `len` method but no corresponding `is_empty` method --> $DIR/len_zero.rs:120:1 | 120 | / impl HasWrongIsEmpty { 121 | | pub fn len(self: &Self) -> isize { 122 | | 1 123 | | } ... | 127 | | } 128 | | } | |_^ error: length comparison to zero --> $DIR/len_zero.rs:141:8 | 141 | if x.len() == 0 { | ^^^^^^^^^^^^ help: using `is_empty` is more concise: `x.is_empty()` | = note: `-D clippy::len-zero` implied by `-D warnings` error: length comparison to zero --> $DIR/len_zero.rs:145:8 | 145 | if "".len() == 0 {} | ^^^^^^^^^^^^^ help: using `is_empty` is more concise: `"".is_empty()` error: length comparison to zero --> $DIR/len_zero.rs:160:8 | 160 | if has_is_empty.len() == 0 { | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()` error: length comparison to zero --> $DIR/len_zero.rs:163:8 | 163 | if has_is_empty.len() != 0 { | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()` error: length comparison to zero --> $DIR/len_zero.rs:166:8 | 166 | if has_is_empty.len() > 0 { | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()` error: length comparison to one --> $DIR/len_zero.rs:169:8 | 169 | if has_is_empty.len() < 1 { | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()` error: length comparison to one --> $DIR/len_zero.rs:172:8 | 172 | if has_is_empty.len() >= 1 { | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()` error: length comparison to zero --> $DIR/len_zero.rs:183:8 | 183 | if 0 == has_is_empty.len() { | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()` error: length comparison to zero --> $DIR/len_zero.rs:186:8 | 186 | if 0 != has_is_empty.len() { | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()` error: length comparison to zero --> $DIR/len_zero.rs:189:8 | 189 | if 0 < has_is_empty.len() { | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()` error: length comparison to one --> $DIR/len_zero.rs:192:8 | 192 | if 1 <= has_is_empty.len() { | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()` error: length comparison to one --> $DIR/len_zero.rs:195:8 | 195 | if 1 > has_is_empty.len() { | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()` error: length comparison to zero --> $DIR/len_zero.rs:209:8 | 209 | if with_is_empty.len() == 0 { | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `with_is_empty.is_empty()` error: length comparison to zero --> $DIR/len_zero.rs:222:8 | 222 | if b.len() != 0 {} | ^^^^^^^^^^^^ help: using `is_empty` is more concise: `!b.is_empty()` error: trait `DependsOnFoo` has a `len` method but no (possibly inherited) `is_empty` method --> $DIR/len_zero.rs:228:1 | 228 | / pub trait DependsOnFoo: Foo { 229 | | fn len(&mut self) -> usize; 230 | | } | |_^ error: aborting due to 19 previous errors