]>
Commit | Line | Data |
---|---|---|
ea8adc8c | 1 | error: 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 |
4 | 6 | / impl PubOne { |
5 | 7 | | pub fn len(self: &Self) -> isize { | |
6 | 8 | | 1 | |
7 | 9 | | } | |
8 | 10 | | } | |
ea8adc8c XL |
9 | | |_^ |
10 | | | |
11 | = note: `-D len-without-is-empty` implied by `-D warnings` | |
12 | ||
13 | error: trait `PubTraitsToo` has a `len` method but no (possibly inherited) `is_empty` method | |
14 | --> $DIR/len_zero.rs:55:1 | |
15 | | | |
16 | 55 | / pub trait PubTraitsToo { | |
17 | 56 | | fn len(self: &Self) -> isize; | |
18 | 57 | | } | |
19 | | |_^ | |
20 | ||
21 | error: item `HasIsEmpty` has a public `len` method but a private `is_empty` method | |
22 | --> $DIR/len_zero.rs:89:1 | |
23 | | | |
24 | 89 | / impl HasIsEmpty { | |
25 | 90 | | pub fn len(self: &Self) -> isize { | |
26 | 91 | | 1 | |
27 | 92 | | } | |
28 | ... | | |
29 | 96 | | } | |
30 | 97 | | } | |
31 | | |_^ | |
32 | ||
33 | error: item `HasWrongIsEmpty` has a public `len` method but no corresponding `is_empty` method | |
34 | --> $DIR/len_zero.rs:118:1 | |
35 | | | |
36 | 118 | / impl HasWrongIsEmpty { | |
37 | 119 | | pub fn len(self: &Self) -> isize { | |
38 | 120 | | 1 | |
39 | 121 | | } | |
40 | ... | | |
41 | 125 | | } | |
42 | 126 | | } | |
43 | | |_^ | |
44 | ||
45 | error: length comparison to zero | |
94b46f34 | 46 | --> $DIR/len_zero.rs:139:8 |
ea8adc8c | 47 | | |
94b46f34 | 48 | 139 | 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 | ||
53 | error: length comparison to zero | |
94b46f34 | 54 | --> $DIR/len_zero.rs:143:8 |
ea8adc8c | 55 | | |
94b46f34 | 56 | 143 | if "".len() == 0 {} |
ea8adc8c XL |
57 | | ^^^^^^^^^^^^^ help: using `is_empty` is more concise: `"".is_empty()` |
58 | ||
59 | error: length comparison to zero | |
60 | --> $DIR/len_zero.rs:158:8 | |
61 | | | |
62 | 158 | if has_is_empty.len() == 0 { | |
63 | | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()` | |
64 | ||
65 | error: length comparison to zero | |
66 | --> $DIR/len_zero.rs:161:8 | |
67 | | | |
68 | 161 | if has_is_empty.len() != 0 { | |
69 | | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()` | |
70 | ||
71 | error: length comparison to zero | |
72 | --> $DIR/len_zero.rs:164:8 | |
73 | | | |
74 | 164 | if has_is_empty.len() > 0 { | |
75 | | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()` | |
76 | ||
94b46f34 XL |
77 | error: length comparison to one |
78 | --> $DIR/len_zero.rs:167:8 | |
79 | | | |
80 | 167 | if has_is_empty.len() < 1 { | |
81 | | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()` | |
82 | ||
83 | error: length comparison to one | |
ea8adc8c XL |
84 | --> $DIR/len_zero.rs:170:8 |
85 | | | |
94b46f34 XL |
86 | 170 | if has_is_empty.len() >= 1 { |
87 | | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()` | |
88 | ||
89 | error: length comparison to zero | |
90 | --> $DIR/len_zero.rs:181:8 | |
91 | | | |
92 | 181 | if 0 == has_is_empty.len() { | |
93 | | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()` | |
94 | ||
95 | error: length comparison to zero | |
96 | --> $DIR/len_zero.rs:184:8 | |
97 | | | |
98 | 184 | if 0 != has_is_empty.len() { | |
99 | | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()` | |
100 | ||
101 | error: length comparison to zero | |
102 | --> $DIR/len_zero.rs:187:8 | |
103 | | | |
104 | 187 | if 0 < has_is_empty.len() { | |
105 | | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()` | |
106 | ||
107 | error: length comparison to one | |
108 | --> $DIR/len_zero.rs:190:8 | |
109 | | | |
110 | 190 | if 1 <= has_is_empty.len() { | |
111 | | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()` | |
112 | ||
113 | error: length comparison to one | |
114 | --> $DIR/len_zero.rs:193:8 | |
115 | | | |
116 | 193 | if 1 > has_is_empty.len() { | |
117 | | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()` | |
118 | ||
119 | error: length comparison to zero | |
120 | --> $DIR/len_zero.rs:207:8 | |
121 | | | |
122 | 207 | if with_is_empty.len() == 0 { | |
ea8adc8c XL |
123 | | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `with_is_empty.is_empty()` |
124 | ||
125 | error: length comparison to zero | |
94b46f34 | 126 | --> $DIR/len_zero.rs:220:8 |
ea8adc8c | 127 | | |
94b46f34 | 128 | 220 | if b.len() != 0 {} |
ea8adc8c XL |
129 | | ^^^^^^^^^^^^ help: using `is_empty` is more concise: `!b.is_empty()` |
130 | ||
abe05a73 | 131 | error: 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 |
134 | 226 | / pub trait DependsOnFoo: Foo { |
135 | 227 | | fn len(&mut self) -> usize; | |
136 | 228 | | } | |
abe05a73 | 137 | | |_^ |
ea8adc8c | 138 | |
94b46f34 | 139 | error: aborting due to 19 previous errors |
2c00a5a8 | 140 |