@@ -16,16 +16,11 @@ error[E0323]: item `bar` is an associated const, which doesn't match its trait `
1616error[E0046]: not all trait items implemented, missing: `bar`
1717 --> $DIR/impl-wrong-item-for-trait.rs:21:1
1818 |
19- 15 | fn bar(&self);
20- | -------------- `bar` from trait
19+ 15 | fn bar(&self);
20+ | -------------- `bar` from trait
2121...
22- 21 | / impl Foo for FooConstForMethod {
23- 22 | | //~^ ERROR E0046
24- 23 | | const bar: u64 = 1;
25- 24 | | //~^ ERROR E0323
26- 25 | | const MY_CONST: u32 = 1;
27- 26 | | }
28- | |_^ missing `bar` in implementation
22+ 21 | impl Foo for FooConstForMethod {
23+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation
2924
3025error[E0324]: item `MY_CONST` is an associated method, which doesn't match its trait `Foo`
3126 --> $DIR/impl-wrong-item-for-trait.rs:33:5
@@ -39,16 +34,11 @@ error[E0324]: item `MY_CONST` is an associated method, which doesn't match its t
3934error[E0046]: not all trait items implemented, missing: `MY_CONST`
4035 --> $DIR/impl-wrong-item-for-trait.rs:30:1
4136 |
42- 16 | const MY_CONST: u32;
43- | -------------------- `MY_CONST` from trait
37+ 16 | const MY_CONST: u32;
38+ | -------------------- `MY_CONST` from trait
4439...
45- 30 | / impl Foo for FooMethodForConst {
46- 31 | | //~^ ERROR E0046
47- 32 | | fn bar(&self) {}
48- 33 | | fn MY_CONST() {}
49- 34 | | //~^ ERROR E0324
50- 35 | | }
51- | |_^ missing `MY_CONST` in implementation
40+ 30 | impl Foo for FooMethodForConst {
41+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `MY_CONST` in implementation
5242
5343error[E0325]: item `bar` is an associated type, which doesn't match its trait `Foo`
5444 --> $DIR/impl-wrong-item-for-trait.rs:41:5
@@ -62,24 +52,17 @@ error[E0325]: item `bar` is an associated type, which doesn't match its trait `F
6252error[E0046]: not all trait items implemented, missing: `bar`
6353 --> $DIR/impl-wrong-item-for-trait.rs:39:1
6454 |
65- 15 | fn bar(&self);
66- | -------------- `bar` from trait
55+ 15 | fn bar(&self);
56+ | -------------- `bar` from trait
6757...
68- 39 | / impl Foo for FooTypeForMethod {
69- 40 | | //~^ ERROR E0046
70- 41 | | type bar = u64;
71- 42 | | //~^ ERROR E0325
72- 43 | | //~| ERROR E0437
73- 44 | | const MY_CONST: u32 = 1;
74- 45 | | }
75- | |_^ missing `bar` in implementation
58+ 39 | impl Foo for FooTypeForMethod {
59+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation
7660
7761error[E0046]: not all trait items implemented, missing: `fmt`
7862 --> $DIR/impl-wrong-item-for-trait.rs:47:1
7963 |
80- 47 | / impl Debug for FooTypeForMethod {
81- 48 | | }
82- | |_^ missing `fmt` in implementation
64+ 47 | impl Debug for FooTypeForMethod {
65+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation
8366 |
8467 = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
8568
0 commit comments