2016-12-01 01:35:25 +03:00
|
|
|
error[E0437]: type `bar` is not a member of trait `Foo`
|
2017-11-20 13:13:27 +01:00
|
|
|
--> $DIR/impl-wrong-item-for-trait.rs:52:5
|
2016-12-01 01:35:25 +03:00
|
|
|
|
|
2017-11-20 13:13:27 +01:00
|
|
|
52 | type bar = u64;
|
2016-12-01 01:35:25 +03:00
|
|
|
| ^^^^^^^^^^^^^^^ not a member of trait `Foo`
|
|
|
|
|
2016-11-28 17:53:59 -08:00
|
|
|
error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo`
|
2017-11-20 13:13:27 +01:00
|
|
|
--> $DIR/impl-wrong-item-for-trait.rs:30:5
|
2016-10-23 18:54:31 -07:00
|
|
|
|
|
2017-07-06 11:52:25 -07:00
|
|
|
15 | fn bar(&self);
|
2016-10-23 18:54:31 -07:00
|
|
|
| -------------- item in trait
|
|
|
|
...
|
2017-11-20 13:13:27 +01:00
|
|
|
30 | const bar: u64 = 1;
|
2016-10-23 18:54:31 -07:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ does not match trait
|
|
|
|
|
|
|
|
error[E0046]: not all trait items implemented, missing: `bar`
|
2017-11-20 13:13:27 +01:00
|
|
|
--> $DIR/impl-wrong-item-for-trait.rs:27:1
|
2016-10-23 18:54:31 -07:00
|
|
|
|
|
2017-07-06 11:52:25 -07:00
|
|
|
15 | fn bar(&self);
|
2016-10-23 17:22:06 -07:00
|
|
|
| -------------- `bar` from trait
|
2016-10-23 18:54:31 -07:00
|
|
|
...
|
2017-11-20 13:13:27 +01:00
|
|
|
27 | / impl Foo for FooConstForMethod {
|
|
|
|
28 | | //~^ ERROR E0046
|
|
|
|
29 | | //~| NOTE missing `bar` in implementation
|
|
|
|
30 | | const bar: u64 = 1;
|
2017-04-06 12:18:18 -07:00
|
|
|
... |
|
2017-11-20 13:13:27 +01:00
|
|
|
33 | | const MY_CONST: u32 = 1;
|
|
|
|
34 | | }
|
2017-04-14 16:38:10 -07:00
|
|
|
| |_^ missing `bar` in implementation
|
2016-10-23 18:54:31 -07:00
|
|
|
|
2016-11-28 17:53:59 -08:00
|
|
|
error[E0324]: item `MY_CONST` is an associated method, which doesn't match its trait `Foo`
|
2017-11-20 13:13:27 +01:00
|
|
|
--> $DIR/impl-wrong-item-for-trait.rs:42:5
|
2016-10-23 18:54:31 -07:00
|
|
|
|
|
2017-11-20 13:13:27 +01:00
|
|
|
20 | const MY_CONST: u32;
|
2016-10-23 18:54:31 -07:00
|
|
|
| -------------------- item in trait
|
|
|
|
...
|
2017-11-20 13:13:27 +01:00
|
|
|
42 | fn MY_CONST() {}
|
2016-10-23 18:54:31 -07:00
|
|
|
| ^^^^^^^^^^^^^^^^ does not match trait
|
|
|
|
|
|
|
|
error[E0046]: not all trait items implemented, missing: `MY_CONST`
|
2017-11-20 13:13:27 +01:00
|
|
|
--> $DIR/impl-wrong-item-for-trait.rs:38:1
|
2016-10-23 18:54:31 -07:00
|
|
|
|
|
2017-11-20 13:13:27 +01:00
|
|
|
20 | const MY_CONST: u32;
|
2016-10-23 17:22:06 -07:00
|
|
|
| -------------------- `MY_CONST` from trait
|
2016-10-23 18:54:31 -07:00
|
|
|
...
|
2017-11-20 13:13:27 +01:00
|
|
|
38 | / impl Foo for FooMethodForConst {
|
|
|
|
39 | | //~^ ERROR E0046
|
|
|
|
40 | | //~| NOTE missing `MY_CONST` in implementation
|
|
|
|
41 | | fn bar(&self) {}
|
2017-04-06 12:18:18 -07:00
|
|
|
... |
|
2017-11-20 13:13:27 +01:00
|
|
|
44 | | //~| NOTE does not match trait
|
|
|
|
45 | | }
|
2017-04-14 16:38:10 -07:00
|
|
|
| |_^ missing `MY_CONST` in implementation
|
2016-10-23 18:54:31 -07:00
|
|
|
|
2016-11-28 17:53:59 -08:00
|
|
|
error[E0325]: item `bar` is an associated type, which doesn't match its trait `Foo`
|
2017-11-20 13:13:27 +01:00
|
|
|
--> $DIR/impl-wrong-item-for-trait.rs:52:5
|
2016-10-23 18:54:31 -07:00
|
|
|
|
|
2017-07-06 11:52:25 -07:00
|
|
|
15 | fn bar(&self);
|
2016-10-23 18:54:31 -07:00
|
|
|
| -------------- item in trait
|
|
|
|
...
|
2017-11-20 13:13:27 +01:00
|
|
|
52 | type bar = u64;
|
2016-10-23 18:54:31 -07:00
|
|
|
| ^^^^^^^^^^^^^^^ does not match trait
|
|
|
|
|
|
|
|
error[E0046]: not all trait items implemented, missing: `bar`
|
2017-11-20 13:13:27 +01:00
|
|
|
--> $DIR/impl-wrong-item-for-trait.rs:49:1
|
2016-10-23 18:54:31 -07:00
|
|
|
|
|
2017-07-06 11:52:25 -07:00
|
|
|
15 | fn bar(&self);
|
2016-10-23 17:22:06 -07:00
|
|
|
| -------------- `bar` from trait
|
2016-10-23 18:54:31 -07:00
|
|
|
...
|
2017-11-20 13:13:27 +01:00
|
|
|
49 | / impl Foo for FooTypeForMethod {
|
|
|
|
50 | | //~^ ERROR E0046
|
|
|
|
51 | | //~| NOTE missing `bar` in implementation
|
|
|
|
52 | | type bar = u64;
|
2017-04-06 12:18:18 -07:00
|
|
|
... |
|
2017-11-20 13:13:27 +01:00
|
|
|
57 | | const MY_CONST: u32 = 1;
|
|
|
|
58 | | }
|
2017-04-14 16:38:10 -07:00
|
|
|
| |_^ missing `bar` in implementation
|
2016-10-23 18:54:31 -07:00
|
|
|
|
|
|
|
error[E0046]: not all trait items implemented, missing: `fmt`
|
2017-11-20 13:13:27 +01:00
|
|
|
--> $DIR/impl-wrong-item-for-trait.rs:60:1
|
2016-10-23 18:54:31 -07:00
|
|
|
|
|
2017-11-20 13:13:27 +01:00
|
|
|
60 | / impl Debug for FooTypeForMethod {
|
|
|
|
61 | | }
|
2017-04-14 16:38:10 -07:00
|
|
|
| |_^ missing `fmt` in implementation
|
2016-10-23 18:54:31 -07:00
|
|
|
|
|
|
|
|
= note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
|
|
|
|
|
2017-07-02 16:09:09 +03:00
|
|
|
error: aborting due to 8 previous errors
|
2016-10-23 18:54:31 -07:00
|
|
|
|