]> git.lizzy.rs Git - rust.git/blob - clippy_tests/examples/len_zero.stderr
110bddfec10a7bddfb15701b61aa443f21fbb996
[rust.git] / clippy_tests / examples / len_zero.stderr
1 error: item `PubOne` has a public `len` method but no corresponding `is_empty` method
2   --> len_zero.rs:9:1
3    |
4 9  | / impl PubOne {
5 10 | |     pub fn len(self: &Self) -> isize {
6 11 | |         1
7 12 | |     }
8 13 | | }
9    | |_^
10    |
11    = note: `-D len-without-is-empty` implied by `-D warnings`
12
13 error: trait `PubTraitsToo` has a `len` method but no `is_empty` method
14   --> len_zero.rs:55:1
15    |
16 55 | / pub trait PubTraitsToo {
17 56 | |     fn len(self: &Self) -> isize;
18 57 | | }
19    | |_^
20    |
21    = note: `-D len-without-is-empty` implied by `-D warnings`
22
23 error: item `HasIsEmpty` has a public `len` method but a private `is_empty` method
24   --> len_zero.rs:89:1
25    |
26 89 | / impl HasIsEmpty {
27 90 | |     pub fn len(self: &Self) -> isize {
28 91 | |         1
29 92 | |     }
30 ...  |
31 96 | |     }
32 97 | | }
33    | |_^
34    |
35    = note: `-D len-without-is-empty` implied by `-D warnings`
36
37 error: item `HasWrongIsEmpty` has a public `len` method but no corresponding `is_empty` method
38    --> len_zero.rs:118:1
39     |
40 118 | / impl HasWrongIsEmpty {
41 119 | |     pub fn len(self: &Self) -> isize {
42 120 | |         1
43 121 | |     }
44 ...   |
45 125 | |     }
46 126 | | }
47     | |_^
48     |
49     = note: `-D len-without-is-empty` implied by `-D warnings`
50
51 error: length comparison to zero
52    --> len_zero.rs:130:8
53     |
54 130 |     if x.len() == 0 {
55     |        ^^^^^^^^^^^^ help: using `is_empty` is more concise: `x.is_empty()`
56     |
57     = note: `-D len-zero` implied by `-D warnings`
58
59 error: length comparison to zero
60    --> len_zero.rs:134:8
61     |
62 134 |     if "".len() == 0 {
63     |        ^^^^^^^^^^^^^ help: using `is_empty` is more concise: `"".is_empty()`
64     |
65     = note: `-D len-zero` implied by `-D warnings`
66
67 error: length comparison to zero
68    --> len_zero.rs:148:8
69     |
70 148 |     if has_is_empty.len() == 0 {
71     |        ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()`
72     |
73     = note: `-D len-zero` implied by `-D warnings`
74
75 error: length comparison to zero
76    --> len_zero.rs:151:8
77     |
78 151 |     if has_is_empty.len() != 0 {
79     |        ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
80     |
81     = note: `-D len-zero` implied by `-D warnings`
82
83 error: length comparison to zero
84    --> len_zero.rs:154:8
85     |
86 154 |     if has_is_empty.len() > 0 {
87     |        ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
88     |
89     = note: `-D len-zero` implied by `-D warnings`
90
91 error: length comparison to zero
92    --> len_zero.rs:160:8
93     |
94 160 |     if with_is_empty.len() == 0 {
95     |        ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `with_is_empty.is_empty()`
96     |
97     = note: `-D len-zero` implied by `-D warnings`
98
99 error: length comparison to zero
100    --> len_zero.rs:172:8
101     |
102 172 |     if b.len() != 0 {
103     |        ^^^^^^^^^^^^ help: using `is_empty` is more concise: `!b.is_empty()`
104     |
105     = note: `-D len-zero` implied by `-D warnings`
106
107 error: aborting due to previous error(s)
108
109 error: Could not compile `clippy_tests`.
110
111 To learn more, run the command again with --verbose.