]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/len_without_is_empty.stderr
New upstream version 1.53.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / len_without_is_empty.stderr
CommitLineData
f20569fa 1error: struct `PubOne` has a public `len` method, but no `is_empty` method
cdc7bbd5 2 --> $DIR/len_without_is_empty.rs:9:5
f20569fa
XL
3 |
4LL | pub fn len(&self) -> isize {
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
6 |
7 = note: `-D clippy::len-without-is-empty` implied by `-D warnings`
8
9error: trait `PubTraitsToo` has a `len` method but no (possibly inherited) `is_empty` method
cdc7bbd5 10 --> $DIR/len_without_is_empty.rs:57:1
f20569fa
XL
11 |
12LL | / pub trait PubTraitsToo {
13LL | | fn len(&self) -> isize;
14LL | | }
15 | |_^
16
17error: struct `HasIsEmpty` has a public `len` method, but a private `is_empty` method
cdc7bbd5 18 --> $DIR/len_without_is_empty.rs:70:5
f20569fa
XL
19 |
20LL | pub fn len(&self) -> isize {
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
22 |
23note: `is_empty` defined here
cdc7bbd5 24 --> $DIR/len_without_is_empty.rs:74:5
f20569fa
XL
25 |
26LL | fn is_empty(&self) -> bool {
27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
28
29error: struct `HasWrongIsEmpty` has a public `len` method, but the `is_empty` method has an unexpected signature
cdc7bbd5 30 --> $DIR/len_without_is_empty.rs:82:5
f20569fa
XL
31 |
32LL | pub fn len(&self) -> isize {
33 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
34 |
35note: `is_empty` defined here
cdc7bbd5 36 --> $DIR/len_without_is_empty.rs:86:5
f20569fa
XL
37 |
38LL | pub fn is_empty(&self, x: u32) -> bool {
39 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40 = note: expected signature: `(&self) -> bool`
41
42error: struct `MismatchedSelf` has a public `len` method, but the `is_empty` method has an unexpected signature
cdc7bbd5 43 --> $DIR/len_without_is_empty.rs:94:5
f20569fa
XL
44 |
45LL | pub fn len(self) -> isize {
46 | ^^^^^^^^^^^^^^^^^^^^^^^^^
47 |
48note: `is_empty` defined here
cdc7bbd5 49 --> $DIR/len_without_is_empty.rs:98:5
f20569fa
XL
50 |
51LL | pub fn is_empty(&self) -> bool {
52 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
53 = note: expected signature: `(self) -> bool`
54
55error: trait `DependsOnFoo` has a `len` method but no (possibly inherited) `is_empty` method
cdc7bbd5 56 --> $DIR/len_without_is_empty.rs:173:1
f20569fa
XL
57 |
58LL | / pub trait DependsOnFoo: Foo {
59LL | | fn len(&mut self) -> usize;
60LL | | }
61 | |_^
62
cdc7bbd5
XL
63error: struct `OptionalLen3` has a public `len` method, but the `is_empty` method has an unexpected signature
64 --> $DIR/len_without_is_empty.rs:218:5
65 |
66LL | pub fn len(&self) -> usize {
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
68 |
69note: `is_empty` defined here
70 --> $DIR/len_without_is_empty.rs:223:5
71 |
72LL | pub fn is_empty(&self) -> Option<bool> {
73 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74 = note: expected signature: `(&self) -> bool`
75
76error: struct `ResultLen` has a public `len` method, but the `is_empty` method has an unexpected signature
77 --> $DIR/len_without_is_empty.rs:230:5
78 |
79LL | pub fn len(&self) -> Result<usize, ()> {
80 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
81 |
82note: `is_empty` defined here
83 --> $DIR/len_without_is_empty.rs:235:5
84 |
85LL | pub fn is_empty(&self) -> Option<bool> {
86 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
87 = note: expected signature: `(&self) -> bool` or `(&self) -> Result<bool>
88
89error: this returns a `Result<_, ()>`
90 --> $DIR/len_without_is_empty.rs:230:5
91 |
92LL | pub fn len(&self) -> Result<usize, ()> {
93 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
94 |
95 = note: `-D clippy::result-unit-err` implied by `-D warnings`
96 = help: use a custom `Error` type instead
97
98error: this returns a `Result<_, ()>`
99 --> $DIR/len_without_is_empty.rs:242:5
100 |
101LL | pub fn len(&self) -> Result<usize, ()> {
102 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103 |
104 = help: use a custom `Error` type instead
105
106error: this returns a `Result<_, ()>`
107 --> $DIR/len_without_is_empty.rs:246:5
108 |
109LL | pub fn is_empty(&self) -> Result<bool, ()> {
110 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
111 |
112 = help: use a custom `Error` type instead
113
114error: this returns a `Result<_, ()>`
115 --> $DIR/len_without_is_empty.rs:253:5
116 |
117LL | pub fn len(&self) -> Result<usize, ()> {
118 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119 |
120 = help: use a custom `Error` type instead
121
122error: aborting due to 12 previous errors
f20569fa 123