]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/len_zero.stderr
New upstream version 1.28.0~beta.14+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / len_zero.stderr
CommitLineData
ea8adc8c 1error: item `PubOne` has a public `len` method but no corresponding `is_empty` method
94b46f34 2 --> $DIR/len_zero.rs:6:1
ea8adc8c 3 |
94b46f34
XL
46 | / impl PubOne {
57 | | pub fn len(self: &Self) -> isize {
68 | | 1
79 | | }
810 | | }
ea8adc8c
XL
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
94b46f34 46 --> $DIR/len_zero.rs:139:8
ea8adc8c 47 |
94b46f34 48139 | if x.len() == 0 {
ea8adc8c
XL
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
94b46f34 54 --> $DIR/len_zero.rs:143:8
ea8adc8c 55 |
94b46f34 56143 | if "".len() == 0 {}
ea8adc8c
XL
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
94b46f34
XL
77error: length comparison to one
78 --> $DIR/len_zero.rs:167:8
79 |
80167 | if has_is_empty.len() < 1 {
81 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()`
82
83error: length comparison to one
ea8adc8c
XL
84 --> $DIR/len_zero.rs:170:8
85 |
94b46f34
XL
86170 | if has_is_empty.len() >= 1 {
87 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
88
89error: length comparison to zero
90 --> $DIR/len_zero.rs:181:8
91 |
92181 | if 0 == has_is_empty.len() {
93 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()`
94
95error: length comparison to zero
96 --> $DIR/len_zero.rs:184:8
97 |
98184 | if 0 != has_is_empty.len() {
99 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
100
101error: length comparison to zero
102 --> $DIR/len_zero.rs:187:8
103 |
104187 | if 0 < has_is_empty.len() {
105 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
106
107error: length comparison to one
108 --> $DIR/len_zero.rs:190:8
109 |
110190 | if 1 <= has_is_empty.len() {
111 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
112
113error: length comparison to one
114 --> $DIR/len_zero.rs:193:8
115 |
116193 | if 1 > has_is_empty.len() {
117 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()`
118
119error: length comparison to zero
120 --> $DIR/len_zero.rs:207:8
121 |
122207 | if with_is_empty.len() == 0 {
ea8adc8c
XL
123 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `with_is_empty.is_empty()`
124
125error: length comparison to zero
94b46f34 126 --> $DIR/len_zero.rs:220:8
ea8adc8c 127 |
94b46f34 128220 | if b.len() != 0 {}
ea8adc8c
XL
129 | ^^^^^^^^^^^^ help: using `is_empty` is more concise: `!b.is_empty()`
130
abe05a73 131error: trait `DependsOnFoo` has a `len` method but no (possibly inherited) `is_empty` method
94b46f34 132 --> $DIR/len_zero.rs:226:1
abe05a73 133 |
94b46f34
XL
134226 | / pub trait DependsOnFoo: Foo {
135227 | | fn len(&mut self) -> usize;
136228 | | }
abe05a73 137 | |_^
ea8adc8c 138
94b46f34 139error: aborting due to 19 previous errors
2c00a5a8 140