rust/tests/ui/span/impl-wrong-item-for-trait.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
2.2 KiB
Plaintext
Raw Normal View History

error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo`
--> $DIR/impl-wrong-item-for-trait.rs:12:5
|
LL | fn bar(&self);
| -------------- item in trait
...
LL | const bar: u64 = 1;
| ^^^^^^^^^^^^^^^^^^^ does not match trait
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
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
|
2018-02-22 18:42:32 -06:00
LL | fn bar(&self);
| -------------- `bar` from trait
...
2018-02-22 18:42:32 -06:00
LL | impl Foo for FooConstForMethod {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation
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
|
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
...
2018-02-22 18:42:32 -06:00
LL | impl Foo for FooMethodForConst {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `MY_CONST` in implementation
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
|
2018-02-22 18:42:32 -06:00
LL | fn bar(&self);
| -------------- `bar` from trait
...
2018-02-22 18:42:32 -06:00
LL | impl Foo for FooTypeForMethod {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation
error[E0046]: not all trait items implemented, missing: `fmt`
--> $DIR/impl-wrong-item-for-trait.rs:35:1
|
LL | impl Debug for FooTypeForMethod {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation
|
2021-01-28 10:01:36 -06:00
= help: implement the missing item: `fn fmt(&self, _: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { todo!() }`
error: aborting due to 7 previous errors
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`.