]> git.lizzy.rs Git - rust.git/blob - tests/ui/len_zero.stderr
Merge remote-tracking branch 'origin/master' into yati
[rust.git] / tests / ui / len_zero.stderr
1 error: item `PubOne` has a public `len` method but no corresponding `is_empty` method
2   --> $DIR/len_zero.rs:9:1
3    |
4 9  |   impl PubOne {
5    |  _^ starting here...
6 10 | |     pub fn len(self: &Self) -> isize {
7 11 | |         1
8 12 | |     }
9 13 | | }
10    | |_^ ...ending here
11    |
12 note: lint level defined here
13   --> $DIR/len_zero.rs:4:9
14    |
15 4  | #![deny(len_without_is_empty, len_zero)]
16    |         ^^^^^^^^^^^^^^^^^^^^
17
18 error: trait `PubTraitsToo` has a `len` method but no `is_empty` method
19   --> $DIR/len_zero.rs:55:1
20    |
21 55 |   pub trait PubTraitsToo {
22    |  _^ starting here...
23 56 | |     fn len(self: &Self) -> isize;
24 57 | | }
25    | |_^ ...ending here
26
27 error: item `HasIsEmpty` has a public `len` method but a private `is_empty` method
28   --> $DIR/len_zero.rs:89:1
29    |
30 89 |   impl HasIsEmpty {
31    |  _^ starting here...
32 90 | |     pub fn len(self: &Self) -> isize {
33 91 | |         1
34 92 | |     }
35 ...  |
36 96 | |     }
37 97 | | }
38    | |_^ ...ending here
39
40 error: item `HasWrongIsEmpty` has a public `len` method but no corresponding `is_empty` method
41    --> $DIR/len_zero.rs:118:1
42     |
43 118 |   impl HasWrongIsEmpty {
44     |  _^ starting here...
45 119 | |     pub fn len(self: &Self) -> isize {
46 120 | |         1
47 121 | |     }
48 ...   |
49 125 | |     }
50 126 | | }
51     | |_^ ...ending here
52
53 error: length comparison to zero
54    --> $DIR/len_zero.rs:130:8
55     |
56 130 |     if x.len() == 0 {
57     |        ^^^^^^^^^^^^
58     |
59 note: lint level defined here
60    --> $DIR/len_zero.rs:4:31
61     |
62 4   | #![deny(len_without_is_empty, len_zero)]
63     |                               ^^^^^^^^
64 help: consider using `is_empty`
65     |     if x.is_empty() {
66
67 error: length comparison to zero
68    --> $DIR/len_zero.rs:137:8
69     |
70 137 |     if "".len() == 0 {
71     |        ^^^^^^^^^^^^^
72     |
73 help: consider using `is_empty`
74     |     if "".is_empty() {
75
76 error: length comparison to zero
77    --> $DIR/len_zero.rs:154:8
78     |
79 154 |     if has_is_empty.len() == 0 {
80     |        ^^^^^^^^^^^^^^^^^^^^^^^
81     |
82 help: consider using `is_empty`
83     |     if has_is_empty.is_empty() {
84
85 error: length comparison to zero
86    --> $DIR/len_zero.rs:160:8
87     |
88 160 |     if has_is_empty.len() != 0 {
89     |        ^^^^^^^^^^^^^^^^^^^^^^^
90     |
91 help: consider using `is_empty`
92     |     if !has_is_empty.is_empty() {
93
94 error: length comparison to zero
95    --> $DIR/len_zero.rs:166:8
96     |
97 166 |     if has_is_empty.len() > 0 {
98     |        ^^^^^^^^^^^^^^^^^^^^^^
99     |
100 help: consider using `is_empty`
101     |     if !has_is_empty.is_empty() {
102
103 error: length comparison to zero
104    --> $DIR/len_zero.rs:175:8
105     |
106 175 |     if with_is_empty.len() == 0 {
107     |        ^^^^^^^^^^^^^^^^^^^^^^^^
108     |
109 help: consider using `is_empty`
110     |     if with_is_empty.is_empty() {
111
112 error: length comparison to zero
113    --> $DIR/len_zero.rs:190:8
114     |
115 190 |     if b.len() != 0 {
116     |        ^^^^^^^^^^^^
117     |
118 help: consider using `is_empty`
119     |     if !b.is_empty() {
120
121 error: aborting due to 11 previous errors
122