blob: dfca435f2a0732b1b8afe4fbbcec364ab51af9e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
error[E0437]: type `bar` is not a member of trait `Foo`
--> $DIR/impl-wrong-item-for-trait.rs:52:5
|
52 | 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:30:5
|
15 | fn bar(&self);
| -------------- item in trait
...
30 | const bar: u64 = 1;
| ^^^^^^^^^^^^^^^^^^^ does not match trait
error[E0046]: not all trait items implemented, missing: `bar`
--> $DIR/impl-wrong-item-for-trait.rs:27:1
|
15 | fn bar(&self);
| -------------- `bar` from trait
...
27 | / impl Foo for FooConstForMethod {
28 | | //~^ ERROR E0046
29 | | //~| NOTE missing `bar` in implementation
30 | | const bar: u64 = 1;
... |
33 | | const MY_CONST: u32 = 1;
34 | | }
| |_^ 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:42:5
|
20 | const MY_CONST: u32;
| -------------------- item in trait
...
42 | fn MY_CONST() {}
| ^^^^^^^^^^^^^^^^ does not match trait
error[E0046]: not all trait items implemented, missing: `MY_CONST`
--> $DIR/impl-wrong-item-for-trait.rs:38:1
|
20 | const MY_CONST: u32;
| -------------------- `MY_CONST` from trait
...
38 | / impl Foo for FooMethodForConst {
39 | | //~^ ERROR E0046
40 | | //~| NOTE missing `MY_CONST` in implementation
41 | | fn bar(&self) {}
... |
44 | | //~| NOTE does not match trait
45 | | }
| |_^ 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:52:5
|
15 | fn bar(&self);
| -------------- item in trait
...
52 | type bar = u64;
| ^^^^^^^^^^^^^^^ does not match trait
error[E0046]: not all trait items implemented, missing: `bar`
--> $DIR/impl-wrong-item-for-trait.rs:49:1
|
15 | fn bar(&self);
| -------------- `bar` from trait
...
49 | / impl Foo for FooTypeForMethod {
50 | | //~^ ERROR E0046
51 | | //~| NOTE missing `bar` in implementation
52 | | type bar = u64;
... |
57 | | const MY_CONST: u32 = 1;
58 | | }
| |_^ missing `bar` in implementation
error[E0046]: not all trait items implemented, missing: `fmt`
--> $DIR/impl-wrong-item-for-trait.rs:60:1
|
60 | / impl Debug for FooTypeForMethod {
61 | | }
| |_^ 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
|