]> git.lizzy.rs Git - rust.git/blob - tests/ui/len_zero.stderr
Update to `rustc 1.19.0-nightly (6a5fc9eec 2017-05-02)`
[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 10 | |     pub fn len(self: &Self) -> isize {
6 11 | |         1
7 12 | |     }
8 13 | | }
9    | |_^
10    |
11 note: lint level defined here
12   --> $DIR/len_zero.rs:4:9
13    |
14 4  | #![deny(len_without_is_empty, len_zero)]
15    |         ^^^^^^^^^^^^^^^^^^^^
16
17 error: trait `PubTraitsToo` has a `len` method but no `is_empty` method
18   --> $DIR/len_zero.rs:55:1
19    |
20 55 | / pub trait PubTraitsToo {
21 56 | |     fn len(self: &Self) -> isize;
22 57 | | }
23    | |_^
24
25 error: item `HasIsEmpty` has a public `len` method but a private `is_empty` method
26   --> $DIR/len_zero.rs:89:1
27    |
28 89 | / impl HasIsEmpty {
29 90 | |     pub fn len(self: &Self) -> isize {
30 91 | |         1
31 92 | |     }
32 ...  |
33 96 | |     }
34 97 | | }
35    | |_^
36
37 error: item `HasWrongIsEmpty` has a public `len` method but no corresponding `is_empty` method
38    --> $DIR/len_zero.rs:118:1
39     |
40 118 | / impl HasWrongIsEmpty {
41 119 | |     pub fn len(self: &Self) -> isize {
42 120 | |         1
43 121 | |     }
44 ...   |
45 125 | |     }
46 126 | | }
47     | |_^
48
49 error: length comparison to zero
50    --> $DIR/len_zero.rs:130:8
51     |
52 130 |     if x.len() == 0 {
53     |        ^^^^^^^^^^^^ help: using `is_empty` is more concise: `x.is_empty()`
54     |
55 note: lint level defined here
56    --> $DIR/len_zero.rs:4:31
57     |
58 4   | #![deny(len_without_is_empty, len_zero)]
59     |                               ^^^^^^^^
60
61 error: length comparison to zero
62    --> $DIR/len_zero.rs:137:8
63     |
64 137 |     if "".len() == 0 {
65     |        ^^^^^^^^^^^^^ help: using `is_empty` is more concise: `"".is_empty()`
66
67 error: length comparison to zero
68    --> $DIR/len_zero.rs:154:8
69     |
70 154 |     if has_is_empty.len() == 0 {
71     |        ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()`
72
73 error: length comparison to zero
74    --> $DIR/len_zero.rs:160:8
75     |
76 160 |     if has_is_empty.len() != 0 {
77     |        ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
78
79 error: length comparison to zero
80    --> $DIR/len_zero.rs:166:8
81     |
82 166 |     if has_is_empty.len() > 0 {
83     |        ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
84
85 error: length comparison to zero
86    --> $DIR/len_zero.rs:175:8
87     |
88 175 |     if with_is_empty.len() == 0 {
89     |        ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `with_is_empty.is_empty()`
90
91 error: length comparison to zero
92    --> $DIR/len_zero.rs:190:8
93     |
94 190 |     if b.len() != 0 {
95     |        ^^^^^^^^^^^^ help: using `is_empty` is more concise: `!b.is_empty()`
96
97 error: aborting due to 11 previous errors
98