]> git.lizzy.rs Git - rust.git/blob - tests/ui/span/impl-wrong-item-for-trait.stderr
Rollup merge of #106441 - mllken:abstract-socket-noref, r=joshtriplett
[rust.git] / tests / ui / span / impl-wrong-item-for-trait.stderr
1 error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo`
2   --> $DIR/impl-wrong-item-for-trait.rs:12:5
3    |
4 LL |     fn bar(&self);
5    |     -------------- item in trait
6 ...
7 LL |     const bar: u64 = 1;
8    |     ^^^^^^^^^^^^^^^^^^^ does not match trait
9
10 error[E0324]: item `MY_CONST` is an associated method, which doesn't match its trait `Foo`
11   --> $DIR/impl-wrong-item-for-trait.rs:22:5
12    |
13 LL |     const MY_CONST: u32;
14    |     -------------------- item in trait
15 ...
16 LL |     fn MY_CONST() {}
17    |     ^^^^^^^^^^^^^^^^ does not match trait
18
19 error[E0325]: item `bar` is an associated type, which doesn't match its trait `Foo`
20   --> $DIR/impl-wrong-item-for-trait.rs:30:5
21    |
22 LL |     fn bar(&self);
23    |     -------------- item in trait
24 ...
25 LL |     type bar = u64;
26    |     ^^^^^^^^^^^^^^^ does not match trait
27
28 error[E0046]: not all trait items implemented, missing: `bar`
29   --> $DIR/impl-wrong-item-for-trait.rs:10:1
30    |
31 LL |     fn bar(&self);
32    |     -------------- `bar` from trait
33 ...
34 LL | impl Foo for FooConstForMethod {
35    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation
36
37 error[E0046]: not all trait items implemented, missing: `MY_CONST`
38   --> $DIR/impl-wrong-item-for-trait.rs:19:1
39    |
40 LL |     const MY_CONST: u32;
41    |     ------------------- `MY_CONST` from trait
42 ...
43 LL | impl Foo for FooMethodForConst {
44    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `MY_CONST` in implementation
45
46 error[E0046]: not all trait items implemented, missing: `bar`
47   --> $DIR/impl-wrong-item-for-trait.rs:28:1
48    |
49 LL |     fn bar(&self);
50    |     -------------- `bar` from trait
51 ...
52 LL | impl Foo for FooTypeForMethod {
53    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation
54
55 error[E0046]: not all trait items implemented, missing: `fmt`
56   --> $DIR/impl-wrong-item-for-trait.rs:35:1
57    |
58 LL | impl Debug for FooTypeForMethod {}
59    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation
60    |
61    = help: implement the missing item: `fn fmt(&self, _: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { todo!() }`
62
63 error: aborting due to 7 previous errors
64
65 Some errors have detailed explanations: E0046, E0323, E0324, E0325.
66 For more information about an error, try `rustc --explain E0046`.