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