@@ -16,16 +16,11 @@ error[E0323]: item `bar` is an associated const, which doesn't match its trait `
16
16
error[E0046]: not all trait items implemented, missing: `bar`
17
17
--> $DIR/impl-wrong-item-for-trait.rs:21:1
18
18
|
19
- 15 | fn bar(&self);
20
- | -------------- `bar` from trait
19
+ 15 | fn bar(&self);
20
+ | -------------- `bar` from trait
21
21
...
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
29
24
30
25
error[E0324]: item `MY_CONST` is an associated method, which doesn't match its trait `Foo`
31
26
--> $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
39
34
error[E0046]: not all trait items implemented, missing: `MY_CONST`
40
35
--> $DIR/impl-wrong-item-for-trait.rs:30:1
41
36
|
42
- 16 | const MY_CONST: u32;
43
- | -------------------- `MY_CONST` from trait
37
+ 16 | const MY_CONST: u32;
38
+ | -------------------- `MY_CONST` from trait
44
39
...
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
52
42
53
43
error[E0325]: item `bar` is an associated type, which doesn't match its trait `Foo`
54
44
--> $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
62
52
error[E0046]: not all trait items implemented, missing: `bar`
63
53
--> $DIR/impl-wrong-item-for-trait.rs:39:1
64
54
|
65
- 15 | fn bar(&self);
66
- | -------------- `bar` from trait
55
+ 15 | fn bar(&self);
56
+ | -------------- `bar` from trait
67
57
...
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
76
60
77
61
error[E0046]: not all trait items implemented, missing: `fmt`
78
62
--> $DIR/impl-wrong-item-for-trait.rs:47:1
79
63
|
80
- 47 | / impl Debug for FooTypeForMethod {
81
- 48 | | }
82
- | |_^ missing `fmt` in implementation
64
+ 47 | impl Debug for FooTypeForMethod {
65
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation
83
66
|
84
67
= note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
85
68
0 commit comments