]> git.lizzy.rs Git - rust.git/blob - tests/ui/len_zero.stderr
rustup and compile-fail -> ui test move
[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:10:5
3    |
4 10 |       pub fn len(self: &Self) -> isize { //~ERROR item `PubOne` has a public `len` method but no corresponding `is_empty`
5    |  _____^ starting here...
6 11 | |         1
7 12 | |     }
8    | |_____^ ...ending here
9    |
10 note: lint level defined here
11   --> $DIR/len_zero.rs:4:9
12    |
13 4  | #![deny(len_without_is_empty, len_zero)]
14    |         ^^^^^^^^^^^^^^^^^^^^
15
16 error: trait `PubTraitsToo` has a `len` method but no `is_empty` method
17   --> $DIR/len_zero.rs:32:5
18    |
19 32 |     fn len(self: &Self) -> isize; //~ERROR trait `PubTraitsToo` has a `len` method but no `is_empty`
20    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21
22 error: item `HasIsEmpty` has a public `len` method but a private `is_empty` method
23   --> $DIR/len_zero.rs:66:5
24    |
25 66 |       pub fn len(self: &Self) -> isize { //~ERROR item `HasIsEmpty` has a public `len` method but a private `is_empty`
26    |  _____^ starting here...
27 67 | |         1
28 68 | |     }
29    | |_____^ ...ending here
30
31 error: item `HasWrongIsEmpty` has a public `len` method but no corresponding `is_empty` method
32   --> $DIR/len_zero.rs:95:5
33    |
34 95 |       pub fn len(self: &Self) -> isize { //~ERROR item `HasWrongIsEmpty` has a public `len` method but no corresponding `is_empty`
35    |  _____^ starting here...
36 96 | |         1
37 97 | |     }
38    | |_____^ ...ending here
39
40 error: length comparison to zero
41    --> $DIR/len_zero.rs:106:8
42     |
43 106 |     if x.len() == 0 {
44     |        ^^^^^^^^^^^^
45     |
46 note: lint level defined here
47    --> $DIR/len_zero.rs:4:31
48     |
49 4   | #![deny(len_without_is_empty, len_zero)]
50     |                               ^^^^^^^^
51 help: consider using `is_empty`
52     |     if x.is_empty() {
53
54 error: length comparison to zero
55    --> $DIR/len_zero.rs:113:8
56     |
57 113 |     if "".len() == 0 {
58     |        ^^^^^^^^^^^^^
59     |
60 help: consider using `is_empty`
61     |     if "".is_empty() {
62
63 error: length comparison to zero
64    --> $DIR/len_zero.rs:130:8
65     |
66 130 |     if has_is_empty.len() == 0 {
67     |        ^^^^^^^^^^^^^^^^^^^^^^^
68     |
69 help: consider using `is_empty`
70     |     if has_is_empty.is_empty() {
71
72 error: length comparison to zero
73    --> $DIR/len_zero.rs:136:8
74     |
75 136 |     if has_is_empty.len() != 0 {
76     |        ^^^^^^^^^^^^^^^^^^^^^^^
77     |
78 help: consider using `is_empty`
79     |     if !has_is_empty.is_empty() {
80
81 error: length comparison to zero
82    --> $DIR/len_zero.rs:142:8
83     |
84 142 |     if has_is_empty.len() > 0 {
85     |        ^^^^^^^^^^^^^^^^^^^^^^
86     |
87 help: consider using `is_empty`
88     |     if !has_is_empty.is_empty() {
89
90 error: length comparison to zero
91    --> $DIR/len_zero.rs:151:8
92     |
93 151 |     if with_is_empty.len() == 0 {
94     |        ^^^^^^^^^^^^^^^^^^^^^^^^
95     |
96 help: consider using `is_empty`
97     |     if with_is_empty.is_empty() {
98
99 error: aborting due to 10 previous errors
100