granite-rust/src/test/ui/span/impl-wrong-item-for-trait.stderr

88 lines
2.6 KiB
Text
Raw Normal View History

error[E0437]: type `bar` is not a member of trait `Foo`
--> $DIR/impl-wrong-item-for-trait.rs:41:5
|
41 | type bar = u64;
| ^^^^^^^^^^^^^^^ not a member of trait `Foo`
error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo`
--> $DIR/impl-wrong-item-for-trait.rs:23:5
|
2017-07-06 11:52:25 -07:00
15 | fn bar(&self);
| -------------- item in trait
...
23 | const bar: u64 = 1;
| ^^^^^^^^^^^^^^^^^^^ does not match trait
error[E0046]: not all trait items implemented, missing: `bar`
--> $DIR/impl-wrong-item-for-trait.rs:21:1
|
2017-07-06 11:52:25 -07:00
15 | fn bar(&self);
| -------------- `bar` from trait
...
21 | / impl Foo for FooConstForMethod {
22 | | //~^ ERROR E0046
23 | | const bar: u64 = 1;
24 | | //~^ ERROR E0323
25 | | const MY_CONST: u32 = 1;
26 | | }
| |_^ missing `bar` in implementation
error[E0324]: item `MY_CONST` is an associated method, which doesn't match its trait `Foo`
--> $DIR/impl-wrong-item-for-trait.rs:33:5
|
16 | const MY_CONST: u32;
| -------------------- item in trait
...
33 | fn MY_CONST() {}
| ^^^^^^^^^^^^^^^^ does not match trait
error[E0046]: not all trait items implemented, missing: `MY_CONST`
--> $DIR/impl-wrong-item-for-trait.rs:30:1
|
16 | const MY_CONST: u32;
| -------------------- `MY_CONST` from trait
...
30 | / impl Foo for FooMethodForConst {
31 | | //~^ ERROR E0046
32 | | fn bar(&self) {}
33 | | fn MY_CONST() {}
34 | | //~^ ERROR E0324
35 | | }
| |_^ missing `MY_CONST` in implementation
error[E0325]: item `bar` is an associated type, which doesn't match its trait `Foo`
--> $DIR/impl-wrong-item-for-trait.rs:41:5
|
2017-07-06 11:52:25 -07:00
15 | fn bar(&self);
| -------------- item in trait
...
41 | type bar = u64;
| ^^^^^^^^^^^^^^^ does not match trait
error[E0046]: not all trait items implemented, missing: `bar`
--> $DIR/impl-wrong-item-for-trait.rs:39:1
|
2017-07-06 11:52:25 -07:00
15 | fn bar(&self);
| -------------- `bar` from trait
...
39 | / impl Foo for FooTypeForMethod {
40 | | //~^ ERROR E0046
41 | | type bar = u64;
42 | | //~^ ERROR E0325
43 | | //~| ERROR E0437
44 | | const MY_CONST: u32 = 1;
45 | | }
| |_^ missing `bar` in implementation
error[E0046]: not all trait items implemented, missing: `fmt`
--> $DIR/impl-wrong-item-for-trait.rs:47:1
|
47 | / impl Debug for FooTypeForMethod {
48 | | }
| |_^ missing `fmt` in implementation
|
= note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
error: aborting due to 8 previous errors