]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/len_zero.stderr
New upstream version 1.25.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / len_zero.stderr
CommitLineData
ea8adc8c
XL
1error: item `PubOne` has a public `len` method but no corresponding `is_empty` method
2 --> $DIR/len_zero.rs:9:1
3 |
49 | / impl PubOne {
510 | | pub fn len(self: &Self) -> isize {
611 | | 1
712 | | }
813 | | }
9 | |_^
10 |
11 = note: `-D len-without-is-empty` implied by `-D warnings`
12
13error: trait `PubTraitsToo` has a `len` method but no (possibly inherited) `is_empty` method
14 --> $DIR/len_zero.rs:55:1
15 |
1655 | / pub trait PubTraitsToo {
1756 | | fn len(self: &Self) -> isize;
1857 | | }
19 | |_^
20
21error: item `HasIsEmpty` has a public `len` method but a private `is_empty` method
22 --> $DIR/len_zero.rs:89:1
23 |
2489 | / impl HasIsEmpty {
2590 | | pub fn len(self: &Self) -> isize {
2691 | | 1
2792 | | }
28... |
2996 | | }
3097 | | }
31 | |_^
32
33error: item `HasWrongIsEmpty` has a public `len` method but no corresponding `is_empty` method
34 --> $DIR/len_zero.rs:118:1
35 |
36118 | / impl HasWrongIsEmpty {
37119 | | pub fn len(self: &Self) -> isize {
38120 | | 1
39121 | | }
40... |
41125 | | }
42126 | | }
43 | |_^
44
45error: length comparison to zero
46 --> $DIR/len_zero.rs:140:8
47 |
48140 | if x.len() == 0 {
49 | ^^^^^^^^^^^^ help: using `is_empty` is more concise: `x.is_empty()`
50 |
51 = note: `-D len-zero` implied by `-D warnings`
52
53error: length comparison to zero
54 --> $DIR/len_zero.rs:144:8
55 |
56144 | if "".len() == 0 {
57 | ^^^^^^^^^^^^^ help: using `is_empty` is more concise: `"".is_empty()`
58
59error: length comparison to zero
60 --> $DIR/len_zero.rs:158:8
61 |
62158 | if has_is_empty.len() == 0 {
63 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()`
64
65error: length comparison to zero
66 --> $DIR/len_zero.rs:161:8
67 |
68161 | if has_is_empty.len() != 0 {
69 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
70
71error: length comparison to zero
72 --> $DIR/len_zero.rs:164:8
73 |
74164 | if has_is_empty.len() > 0 {
75 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
76
77error: length comparison to zero
78 --> $DIR/len_zero.rs:170:8
79 |
80170 | if with_is_empty.len() == 0 {
81 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `with_is_empty.is_empty()`
82
83error: length comparison to zero
84 --> $DIR/len_zero.rs:182:8
85 |
86182 | if b.len() != 0 {
87 | ^^^^^^^^^^^^ help: using `is_empty` is more concise: `!b.is_empty()`
88
abe05a73
XL
89error: trait `DependsOnFoo` has a `len` method but no (possibly inherited) `is_empty` method
90 --> $DIR/len_zero.rs:189:1
91 |
92189 | / pub trait DependsOnFoo: Foo {
93190 | | fn len(&mut self) -> usize;
94191 | | }
95 | |_^
ea8adc8c 96
2c00a5a8
XL
97error: aborting due to 12 previous errors
98