2022-01-08 11:22:06 +00:00
|
|
|
error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo`
|
|
|
|
--> $DIR/impl-wrong-item-for-trait.rs:12:5
|
2016-11-30 22:35:25 +00:00
|
|
|
|
|
2022-01-08 11:22:06 +00:00
|
|
|
LL | fn bar(&self);
|
|
|
|
| -------------- item in trait
|
|
|
|
...
|
|
|
|
LL | const bar: u64 = 1;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^ does not match trait
|
2016-11-30 22:35:25 +00:00
|
|
|
|
2021-11-18 22:33:49 +00:00
|
|
|
error[E0324]: item `MY_CONST` is an associated method, which doesn't match its trait `Foo`
|
|
|
|
--> $DIR/impl-wrong-item-for-trait.rs:22:5
|
|
|
|
|
|
|
|
|
LL | const MY_CONST: u32;
|
|
|
|
| -------------------- item in trait
|
|
|
|
...
|
|
|
|
LL | fn MY_CONST() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^ does not match trait
|
|
|
|
|
|
|
|
error[E0325]: item `bar` is an associated type, which doesn't match its trait `Foo`
|
|
|
|
--> $DIR/impl-wrong-item-for-trait.rs:30:5
|
|
|
|
|
|
|
|
|
LL | fn bar(&self);
|
|
|
|
| -------------- item in trait
|
|
|
|
...
|
|
|
|
LL | type bar = u64;
|
|
|
|
| ^^^^^^^^^^^^^^^ does not match trait
|
|
|
|
|
2016-10-24 01:54:31 +00:00
|
|
|
error[E0046]: not all trait items implemented, missing: `bar`
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/impl-wrong-item-for-trait.rs:10:1
|
2016-10-24 01:54:31 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | fn bar(&self);
|
2017-12-19 22:41:03 +00:00
|
|
|
| -------------- `bar` from trait
|
2016-10-24 01:54:31 +00:00
|
|
|
...
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | impl Foo for FooConstForMethod {
|
2017-12-19 22:41:03 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation
|
2016-10-24 01:54:31 +00:00
|
|
|
|
|
|
|
error[E0046]: not all trait items implemented, missing: `MY_CONST`
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/impl-wrong-item-for-trait.rs:19:1
|
2016-10-24 01:54:31 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | const MY_CONST: u32;
|
2022-02-13 15:27:59 +00:00
|
|
|
| ------------------- `MY_CONST` from trait
|
2016-10-24 01:54:31 +00:00
|
|
|
...
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | impl Foo for FooMethodForConst {
|
2017-12-19 22:41:03 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `MY_CONST` in implementation
|
2016-10-24 01:54:31 +00:00
|
|
|
|
|
|
|
error[E0046]: not all trait items implemented, missing: `bar`
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/impl-wrong-item-for-trait.rs:28:1
|
2016-10-24 01:54:31 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | fn bar(&self);
|
2017-12-19 22:41:03 +00:00
|
|
|
| -------------- `bar` from trait
|
2016-10-24 01:54:31 +00:00
|
|
|
...
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | impl Foo for FooTypeForMethod {
|
2017-12-19 22:41:03 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation
|
2016-10-24 01:54:31 +00:00
|
|
|
|
|
|
|
error[E0046]: not all trait items implemented, missing: `fmt`
|
2022-01-08 11:22:06 +00:00
|
|
|
--> $DIR/impl-wrong-item-for-trait.rs:35:1
|
2016-10-24 01:54:31 +00:00
|
|
|
|
|
2022-01-08 11:22:06 +00:00
|
|
|
LL | impl Debug for FooTypeForMethod {}
|
2017-12-19 22:41:03 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation
|
2016-10-24 01:54:31 +00:00
|
|
|
|
|
2021-01-28 16:01:36 +00:00
|
|
|
= help: implement the missing item: `fn fmt(&self, _: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { todo!() }`
|
2016-10-24 01:54:31 +00:00
|
|
|
|
2022-01-08 11:22:06 +00:00
|
|
|
error: aborting due to 7 previous errors
|
2016-10-24 01:54:31 +00:00
|
|
|
|
2022-01-08 11:22:06 +00:00
|
|
|
Some errors have detailed explanations: E0046, E0323, E0324, E0325.
|
2018-03-03 14:59:40 +00:00
|
|
|
For more information about an error, try `rustc --explain E0046`.
|