summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/len_zero.stderr
blob: 6c71f1beeac67c27a89916538cbdfcc2af70d896 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
error: length comparison to zero
  --> $DIR/len_zero.rs:61:8
   |
LL |     if x.len() == 0 {
   |        ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `x.is_empty()`
   |
   = note: `-D clippy::len-zero` implied by `-D warnings`

error: length comparison to zero
  --> $DIR/len_zero.rs:65:8
   |
LL |     if "".len() == 0 {}
   |        ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `"".is_empty()`

error: length comparison to zero
  --> $DIR/len_zero.rs:80:8
   |
LL |     if has_is_empty.len() == 0 {
   |        ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`

error: length comparison to zero
  --> $DIR/len_zero.rs:83:8
   |
LL |     if has_is_empty.len() != 0 {
   |        ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`

error: length comparison to zero
  --> $DIR/len_zero.rs:86:8
   |
LL |     if has_is_empty.len() > 0 {
   |        ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`

error: length comparison to one
  --> $DIR/len_zero.rs:89:8
   |
LL |     if has_is_empty.len() < 1 {
   |        ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`

error: length comparison to one
  --> $DIR/len_zero.rs:92:8
   |
LL |     if has_is_empty.len() >= 1 {
   |        ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`

error: length comparison to zero
  --> $DIR/len_zero.rs:103:8
   |
LL |     if 0 == has_is_empty.len() {
   |        ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`

error: length comparison to zero
  --> $DIR/len_zero.rs:106:8
   |
LL |     if 0 != has_is_empty.len() {
   |        ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`

error: length comparison to zero
  --> $DIR/len_zero.rs:109:8
   |
LL |     if 0 < has_is_empty.len() {
   |        ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`

error: length comparison to one
  --> $DIR/len_zero.rs:112:8
   |
LL |     if 1 <= has_is_empty.len() {
   |        ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`

error: length comparison to one
  --> $DIR/len_zero.rs:115:8
   |
LL |     if 1 > has_is_empty.len() {
   |        ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`

error: length comparison to zero
  --> $DIR/len_zero.rs:129:8
   |
LL |     if with_is_empty.len() == 0 {
   |        ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `with_is_empty.is_empty()`

error: length comparison to zero
  --> $DIR/len_zero.rs:142:8
   |
LL |     if b.len() != 0 {}
   |        ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!b.is_empty()`

error: aborting due to 14 previous errors