@@ -4,6 +4,15 @@ error[E0437]: type `bar` is not a member of trait `Foo`
44LL | type bar = u64;
55 | ^^^^^^^^^^^^^^^ not a member of trait `Foo`
66
7+ error[E0324]: item `MY_CONST` is an associated method, which doesn't match its trait `Foo`
8+ --> $DIR/impl-wrong-item-for-trait.rs:22:5
9+ |
10+ LL | const MY_CONST: u32;
11+ | -------------------- item in trait
12+ ...
13+ LL | fn MY_CONST() {}
14+ | ^^^^^^^^^^^^^^^^ does not match trait
15+
716error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo`
817 --> $DIR/impl-wrong-item-for-trait.rs:12:5
918 |
@@ -13,6 +22,15 @@ LL | fn bar(&self);
1322LL | const bar: u64 = 1;
1423 | ^^^^^^^^^^^^^^^^^^^ does not match trait
1524
25+ error[E0325]: item `bar` is an associated type, which doesn't match its trait `Foo`
26+ --> $DIR/impl-wrong-item-for-trait.rs:30:5
27+ |
28+ LL | fn bar(&self);
29+ | -------------- item in trait
30+ ...
31+ LL | type bar = u64;
32+ | ^^^^^^^^^^^^^^^ does not match trait
33+
1634error[E0046]: not all trait items implemented, missing: `bar`
1735 --> $DIR/impl-wrong-item-for-trait.rs:10:1
1836 |
@@ -22,15 +40,6 @@ LL | fn bar(&self);
2240LL | impl Foo for FooConstForMethod {
2341 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation
2442
25- error[E0324]: item `MY_CONST` is an associated method, which doesn't match its trait `Foo`
26- --> $DIR/impl-wrong-item-for-trait.rs:22:5
27- |
28- LL | const MY_CONST: u32;
29- | -------------------- item in trait
30- ...
31- LL | fn MY_CONST() {}
32- | ^^^^^^^^^^^^^^^^ does not match trait
33-
3443error[E0046]: not all trait items implemented, missing: `MY_CONST`
3544 --> $DIR/impl-wrong-item-for-trait.rs:19:1
3645 |
@@ -40,15 +49,6 @@ LL | const MY_CONST: u32;
4049LL | impl Foo for FooMethodForConst {
4150 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `MY_CONST` in implementation
4251
43- error[E0325]: item `bar` is an associated type, which doesn't match its trait `Foo`
44- --> $DIR/impl-wrong-item-for-trait.rs:30:5
45- |
46- LL | fn bar(&self);
47- | -------------- item in trait
48- ...
49- LL | type bar = u64;
50- | ^^^^^^^^^^^^^^^ does not match trait
51-
5252error[E0046]: not all trait items implemented, missing: `bar`
5353 --> $DIR/impl-wrong-item-for-trait.rs:28:1
5454 |
0 commit comments