]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/len_zero.stderr
Rollup merge of #105801 - zertosh:path_mut_os_str_doc_test, r=dtolnay
[rust.git] / src / tools / clippy / tests / ui / len_zero.stderr
1 error: length comparison to zero
2   --> $DIR/len_zero.rs:84:8
3    |
4 LL |     if x.len() == 0 {
5    |        ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `x.is_empty()`
6    |
7    = note: `-D clippy::len-zero` implied by `-D warnings`
8
9 error: length comparison to zero
10   --> $DIR/len_zero.rs:88:8
11    |
12 LL |     if "".len() == 0 {}
13    |        ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `"".is_empty()`
14
15 error: comparison to empty slice
16   --> $DIR/len_zero.rs:97:20
17    |
18 LL |     println!("{}", *s1 == "");
19    |                    ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s1.is_empty()`
20    |
21    = note: `-D clippy::comparison-to-empty` implied by `-D warnings`
22
23 error: comparison to empty slice
24   --> $DIR/len_zero.rs:98:20
25    |
26 LL |     println!("{}", **s2 == "");
27    |                    ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s2.is_empty()`
28
29 error: comparison to empty slice
30   --> $DIR/len_zero.rs:99:20
31    |
32 LL |     println!("{}", ***s3 == "");
33    |                    ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s3.is_empty()`
34
35 error: comparison to empty slice
36   --> $DIR/len_zero.rs:100:20
37    |
38 LL |     println!("{}", ****s4 == "");
39    |                    ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s4.is_empty()`
40
41 error: comparison to empty slice
42   --> $DIR/len_zero.rs:101:20
43    |
44 LL |     println!("{}", *****s5 == "");
45    |                    ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s5.is_empty()`
46
47 error: comparison to empty slice
48   --> $DIR/len_zero.rs:102:20
49    |
50 LL |     println!("{}", ******(s6) == "");
51    |                    ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `(s6).is_empty()`
52
53 error: comparison to empty slice
54   --> $DIR/len_zero.rs:105:20
55    |
56 LL |     println!("{}", &**d2s == "");
57    |                    ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `(**d2s).is_empty()`
58
59 error: length comparison to zero
60   --> $DIR/len_zero.rs:120:8
61    |
62 LL |     if has_is_empty.len() == 0 {
63    |        ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`
64
65 error: length comparison to zero
66   --> $DIR/len_zero.rs:123:8
67    |
68 LL |     if has_is_empty.len() != 0 {
69    |        ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
70
71 error: length comparison to zero
72   --> $DIR/len_zero.rs:126:8
73    |
74 LL |     if has_is_empty.len() > 0 {
75    |        ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
76
77 error: length comparison to one
78   --> $DIR/len_zero.rs:129:8
79    |
80 LL |     if has_is_empty.len() < 1 {
81    |        ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`
82
83 error: length comparison to one
84   --> $DIR/len_zero.rs:132:8
85    |
86 LL |     if has_is_empty.len() >= 1 {
87    |        ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
88
89 error: length comparison to zero
90   --> $DIR/len_zero.rs:143:8
91    |
92 LL |     if 0 == has_is_empty.len() {
93    |        ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`
94
95 error: length comparison to zero
96   --> $DIR/len_zero.rs:146:8
97    |
98 LL |     if 0 != has_is_empty.len() {
99    |        ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
100
101 error: length comparison to zero
102   --> $DIR/len_zero.rs:149:8
103    |
104 LL |     if 0 < has_is_empty.len() {
105    |        ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
106
107 error: length comparison to one
108   --> $DIR/len_zero.rs:152:8
109    |
110 LL |     if 1 <= has_is_empty.len() {
111    |        ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
112
113 error: length comparison to one
114   --> $DIR/len_zero.rs:155:8
115    |
116 LL |     if 1 > has_is_empty.len() {
117    |        ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`
118
119 error: length comparison to zero
120   --> $DIR/len_zero.rs:169:8
121    |
122 LL |     if with_is_empty.len() == 0 {
123    |        ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `with_is_empty.is_empty()`
124
125 error: length comparison to zero
126   --> $DIR/len_zero.rs:182:8
127    |
128 LL |     if b.len() != 0 {}
129    |        ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!b.is_empty()`
130
131 error: aborting due to 21 previous errors
132