@@ -58,107 +58,113 @@ error: comparison to empty slice
5858LL | println!("{}", &**d2s == "");
5959 | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `(**d2s).is_empty()`
6060
61+ error: comparison to empty slice
62+ --> tests/ui/len_zero.rs:111:20
63+ |
64+ LL | println!("{}", std::borrow::Cow::Borrowed("") == "");
65+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `std::borrow::Cow::Borrowed("").is_empty()`
66+
6167error: length comparison to zero
62- --> tests/ui/len_zero.rs:124 :8
68+ --> tests/ui/len_zero.rs:126 :8
6369 |
6470LL | if has_is_empty.len() == 0 {
6571 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`
6672
6773error: length comparison to zero
68- --> tests/ui/len_zero.rs:127 :8
74+ --> tests/ui/len_zero.rs:129 :8
6975 |
7076LL | if has_is_empty.len() != 0 {
7177 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
7278
7379error: length comparison to zero
74- --> tests/ui/len_zero.rs:130 :8
80+ --> tests/ui/len_zero.rs:132 :8
7581 |
7682LL | if has_is_empty.len() > 0 {
7783 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
7884
7985error: length comparison to one
80- --> tests/ui/len_zero.rs:133 :8
86+ --> tests/ui/len_zero.rs:135 :8
8187 |
8288LL | if has_is_empty.len() < 1 {
8389 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`
8490
8591error: length comparison to one
86- --> tests/ui/len_zero.rs:136 :8
92+ --> tests/ui/len_zero.rs:138 :8
8793 |
8894LL | if has_is_empty.len() >= 1 {
8995 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
9096
9197error: length comparison to zero
92- --> tests/ui/len_zero.rs:147 :8
98+ --> tests/ui/len_zero.rs:149 :8
9399 |
94100LL | if 0 == has_is_empty.len() {
95101 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`
96102
97103error: length comparison to zero
98- --> tests/ui/len_zero.rs:150 :8
104+ --> tests/ui/len_zero.rs:152 :8
99105 |
100106LL | if 0 != has_is_empty.len() {
101107 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
102108
103109error: length comparison to zero
104- --> tests/ui/len_zero.rs:153 :8
110+ --> tests/ui/len_zero.rs:155 :8
105111 |
106112LL | if 0 < has_is_empty.len() {
107113 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
108114
109115error: length comparison to one
110- --> tests/ui/len_zero.rs:156 :8
116+ --> tests/ui/len_zero.rs:158 :8
111117 |
112118LL | if 1 <= has_is_empty.len() {
113119 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
114120
115121error: length comparison to one
116- --> tests/ui/len_zero.rs:159 :8
122+ --> tests/ui/len_zero.rs:161 :8
117123 |
118124LL | if 1 > has_is_empty.len() {
119125 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`
120126
121127error: length comparison to zero
122- --> tests/ui/len_zero.rs:173 :8
128+ --> tests/ui/len_zero.rs:175 :8
123129 |
124130LL | if with_is_empty.len() == 0 {
125131 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `with_is_empty.is_empty()`
126132
127133error: length comparison to zero
128- --> tests/ui/len_zero.rs:185 :6
134+ --> tests/ui/len_zero.rs:187 :6
129135 |
130136LL | (has_is_empty.len() > 0).then(|| println!("This can happen."));
131137 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
132138
133139error: length comparison to zero
134- --> tests/ui/len_zero.rs:186 :6
140+ --> tests/ui/len_zero.rs:188 :6
135141 |
136142LL | (has_is_empty.len() == 0).then(|| println!("Or this!"));
137143 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`
138144
139145error: length comparison to zero
140- --> tests/ui/len_zero.rs:190 :8
146+ --> tests/ui/len_zero.rs:192 :8
141147 |
142148LL | if b.len() != 0 {}
143149 | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!b.is_empty()`
144150
145151error: length comparison to zero
146- --> tests/ui/len_zero.rs:224 :8
152+ --> tests/ui/len_zero.rs:226 :8
147153 |
148154LL | if has_is_empty.len() == compare_to!(0) {}
149155 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`
150156
151157error: length comparison to zero
152- --> tests/ui/len_zero.rs:225 :8
158+ --> tests/ui/len_zero.rs:227 :8
153159 |
154160LL | if has_is_empty.len() == zero!() {}
155161 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`
156162
157163error: length comparison to zero
158- --> tests/ui/len_zero.rs:227 :6
164+ --> tests/ui/len_zero.rs:229 :6
159165 |
160166LL | (compare_to!(0) < has_is_empty.len()).then(|| println!("This can happen."));
161167 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
162168
163- error: aborting due to 26 previous errors
169+ error: aborting due to 27 previous errors
164170
0 commit comments