65 lines
2 KiB
Text
65 lines
2 KiB
Text
![]() |
error[E0323]: item `bar` is an associated const, which doesn't match its trait `<FooConstForMethod as Foo>`
|
||
|
--> $DIR/impl-wrong-item-for-trait.rs:25:5
|
||
|
|
|
||
|
16 | fn bar(&self);
|
||
|
| -------------- item in trait
|
||
|
...
|
||
|
25 | const bar: u64 = 1;
|
||
|
| ^^^^^^^^^^^^^^^^^^^ does not match trait
|
||
|
|
||
|
error[E0046]: not all trait items implemented, missing: `bar`
|
||
|
--> $DIR/impl-wrong-item-for-trait.rs:22:1
|
||
|
|
|
||
|
16 | fn bar(&self);
|
||
|
| -------------- `bar` from trait
|
||
|
...
|
||
|
22 | impl Foo for FooConstForMethod {
|
||
|
| ^ missing `bar` in implementation
|
||
|
|
||
|
error[E0324]: item `MY_CONST` is an associated method, which doesn't match its trait `<FooMethodForConst as Foo>`
|
||
|
--> $DIR/impl-wrong-item-for-trait.rs:37:5
|
||
|
|
|
||
|
17 | const MY_CONST: u32;
|
||
|
| -------------------- item in trait
|
||
|
...
|
||
|
37 | fn MY_CONST() {}
|
||
|
| ^^^^^^^^^^^^^^^^ does not match trait
|
||
|
|
||
|
error[E0046]: not all trait items implemented, missing: `MY_CONST`
|
||
|
--> $DIR/impl-wrong-item-for-trait.rs:33:1
|
||
|
|
|
||
|
17 | const MY_CONST: u32;
|
||
|
| -------------------- `MY_CONST` from trait
|
||
|
...
|
||
|
33 | impl Foo for FooMethodForConst {
|
||
|
| ^ missing `MY_CONST` in implementation
|
||
|
|
||
|
error[E0325]: item `bar` is an associated type, which doesn't match its trait `<FooTypeForMethod as Foo>`
|
||
|
--> $DIR/impl-wrong-item-for-trait.rs:47:5
|
||
|
|
|
||
|
16 | fn bar(&self);
|
||
|
| -------------- item in trait
|
||
|
...
|
||
|
47 | type bar = u64;
|
||
|
| ^^^^^^^^^^^^^^^ does not match trait
|
||
|
|
||
|
error[E0046]: not all trait items implemented, missing: `bar`
|
||
|
--> $DIR/impl-wrong-item-for-trait.rs:44:1
|
||
|
|
|
||
|
16 | fn bar(&self);
|
||
|
| -------------- `bar` from trait
|
||
|
...
|
||
|
44 | impl Foo for FooTypeForMethod {
|
||
|
| ^ missing `bar` in implementation
|
||
|
|
||
|
error[E0046]: not all trait items implemented, missing: `fmt`
|
||
|
--> $DIR/impl-wrong-item-for-trait.rs:53:1
|
||
|
|
|
||
|
53 | impl Debug for FooTypeForMethod {
|
||
|
| ^ missing `fmt` in implementation
|
||
|
|
|
||
|
= note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
|
||
|
|
||
|
error: aborting due to 7 previous errors
|
||
|
|