2016-11-28 17:53:59 -08:00
|
|
|
error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo`
|
2016-10-23 18:54:31 -07:00
|
|
|
--> $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
|
|
|
|
|
|
2016-10-23 17:22:06 -07:00
|
|
|
16 | fn bar(&self);
|
|
|
|
| -------------- `bar` from trait
|
2016-10-23 18:54:31 -07:00
|
|
|
...
|
2016-10-23 17:22:06 -07:00
|
|
|
22 | impl Foo for FooConstForMethod {
|
|
|
|
| _^ starting here...
|
|
|
|
23 | | //~^ ERROR E0046
|
|
|
|
24 | | //~| NOTE missing `bar` in implementation
|
|
|
|
25 | | const bar: u64 = 1;
|
|
|
|
26 | | //~^ ERROR E0323
|
|
|
|
27 | | //~| NOTE does not match trait
|
|
|
|
28 | | const MY_CONST: u32 = 1;
|
|
|
|
29 | | }
|
|
|
|
| |_^ ...ending here: 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`
|
2016-10-23 18:54:31 -07:00
|
|
|
--> $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
|
|
|
|
|
|
2016-10-23 17:22:06 -07:00
|
|
|
17 | const MY_CONST: u32;
|
|
|
|
| -------------------- `MY_CONST` from trait
|
2016-10-23 18:54:31 -07:00
|
|
|
...
|
2016-10-23 17:22:06 -07:00
|
|
|
33 | impl Foo for FooMethodForConst {
|
|
|
|
| _^ starting here...
|
|
|
|
34 | | //~^ ERROR E0046
|
|
|
|
35 | | //~| NOTE missing `MY_CONST` in implementation
|
|
|
|
36 | | fn bar(&self) {}
|
|
|
|
37 | | fn MY_CONST() {}
|
|
|
|
38 | | //~^ ERROR E0324
|
|
|
|
39 | | //~| NOTE does not match trait
|
|
|
|
40 | | }
|
|
|
|
| |_^ ...ending here: 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`
|
2016-10-23 18:54:31 -07:00
|
|
|
--> $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
|
|
|
|
|
|
2016-10-23 17:22:06 -07:00
|
|
|
16 | fn bar(&self);
|
|
|
|
| -------------- `bar` from trait
|
2016-10-23 18:54:31 -07:00
|
|
|
...
|
2016-10-23 17:22:06 -07:00
|
|
|
44 | impl Foo for FooTypeForMethod {
|
|
|
|
| _^ starting here...
|
|
|
|
45 | | //~^ ERROR E0046
|
|
|
|
46 | | //~| NOTE missing `bar` in implementation
|
|
|
|
47 | | type bar = u64;
|
|
|
|
48 | | //~^ ERROR E0325
|
|
|
|
49 | | //~| NOTE does not match trait
|
|
|
|
50 | | const MY_CONST: u32 = 1;
|
|
|
|
51 | | }
|
|
|
|
| |_^ ...ending here: missing `bar` in implementation
|
2016-10-23 18:54:31 -07:00
|
|
|
|
|
|
|
error[E0046]: not all trait items implemented, missing: `fmt`
|
|
|
|
--> $DIR/impl-wrong-item-for-trait.rs:53:1
|
|
|
|
|
|
2016-10-23 17:22:06 -07:00
|
|
|
53 | impl Debug for FooTypeForMethod {
|
|
|
|
| _^ starting here...
|
|
|
|
54 | | }
|
|
|
|
| |_^ ...ending here: 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>`
|
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
|