1 error: struct `PubOne` has a public `len` method, but no `is_empty` method
2 --> $DIR/len_without_is_empty.rs:7:5
4 LL | pub fn len(&self) -> isize {
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = note: `-D clippy::len-without-is-empty` implied by `-D warnings`
9 error: trait `PubTraitsToo` has a `len` method but no (possibly inherited) `is_empty` method
10 --> $DIR/len_without_is_empty.rs:55:1
12 LL | / pub trait PubTraitsToo {
13 LL | | fn len(&self) -> isize;
17 error: struct `HasIsEmpty` has a public `len` method, but a private `is_empty` method
18 --> $DIR/len_without_is_empty.rs:68:5
20 LL | pub fn len(&self) -> isize {
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
23 note: `is_empty` defined here
24 --> $DIR/len_without_is_empty.rs:72:5
26 LL | fn is_empty(&self) -> bool {
27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
29 error: struct `HasWrongIsEmpty` has a public `len` method, but the `is_empty` method has an unexpected signature
30 --> $DIR/len_without_is_empty.rs:80:5
32 LL | pub fn len(&self) -> isize {
33 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
35 note: `is_empty` defined here
36 --> $DIR/len_without_is_empty.rs:84:5
38 LL | pub fn is_empty(&self, x: u32) -> bool {
39 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40 = note: expected signature: `(&self) -> bool`
42 error: struct `MismatchedSelf` has a public `len` method, but the `is_empty` method has an unexpected signature
43 --> $DIR/len_without_is_empty.rs:92:5
45 LL | pub fn len(self) -> isize {
46 | ^^^^^^^^^^^^^^^^^^^^^^^^^
48 note: `is_empty` defined here
49 --> $DIR/len_without_is_empty.rs:96:5
51 LL | pub fn is_empty(&self) -> bool {
52 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
53 = note: expected signature: `(self) -> bool`
55 error: trait `DependsOnFoo` has a `len` method but no (possibly inherited) `is_empty` method
56 --> $DIR/len_without_is_empty.rs:171:1
58 LL | / pub trait DependsOnFoo: Foo {
59 LL | | fn len(&mut self) -> usize;
63 error: struct `OptionalLen3` has a public `len` method, but the `is_empty` method has an unexpected signature
64 --> $DIR/len_without_is_empty.rs:216:5
66 LL | pub fn len(&self) -> usize {
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
69 note: `is_empty` defined here
70 --> $DIR/len_without_is_empty.rs:221:5
72 LL | pub fn is_empty(&self) -> Option<bool> {
73 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74 = note: expected signature: `(&self) -> bool`
76 error: struct `ResultLen` has a public `len` method, but the `is_empty` method has an unexpected signature
77 --> $DIR/len_without_is_empty.rs:228:5
79 LL | pub fn len(&self) -> Result<usize, ()> {
80 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82 note: `is_empty` defined here
83 --> $DIR/len_without_is_empty.rs:233:5
85 LL | pub fn is_empty(&self) -> Option<bool> {
86 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
87 = note: expected signature: `(&self) -> bool` or `(&self) -> Result<bool>
89 error: this returns a `Result<_, ()>`
90 --> $DIR/len_without_is_empty.rs:228:5
92 LL | pub fn len(&self) -> Result<usize, ()> {
93 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95 = help: use a custom `Error` type instead
96 = note: `-D clippy::result-unit-err` implied by `-D warnings`
98 error: this returns a `Result<_, ()>`
99 --> $DIR/len_without_is_empty.rs:240:5
101 LL | pub fn len(&self) -> Result<usize, ()> {
102 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104 = help: use a custom `Error` type instead
106 error: this returns a `Result<_, ()>`
107 --> $DIR/len_without_is_empty.rs:244:5
109 LL | pub fn is_empty(&self) -> Result<bool, ()> {
110 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112 = help: use a custom `Error` type instead
114 error: this returns a `Result<_, ()>`
115 --> $DIR/len_without_is_empty.rs:251:5
117 LL | pub fn len(&self) -> Result<usize, ()> {
118 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120 = help: use a custom `Error` type instead
122 error: aborting due to 12 previous errors