]>
Commit | Line | Data |
---|---|---|
32a655c1 SL |
1 | error[E0437]: type `bar` is not a member of trait `Foo` |
2 | --> $DIR/impl-wrong-item-for-trait.rs:47:5 | |
3 | | | |
4 | 47 | type bar = u64; | |
5 | | ^^^^^^^^^^^^^^^ not a member of trait `Foo` | |
6 | ||
476ff2be SL |
7 | error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo` |
8 | --> $DIR/impl-wrong-item-for-trait.rs:25:5 | |
9 | | | |
10 | 16 | fn bar(&self); | |
11 | | -------------- item in trait | |
12 | ... | |
13 | 25 | const bar: u64 = 1; | |
14 | | ^^^^^^^^^^^^^^^^^^^ does not match trait | |
15 | ||
16 | error[E0046]: not all trait items implemented, missing: `bar` | |
17 | --> $DIR/impl-wrong-item-for-trait.rs:22:1 | |
18 | | | |
19 | 16 | fn bar(&self); | |
20 | | -------------- `bar` from trait | |
21 | ... | |
cc61c64b | 22 | 22 | / impl Foo for FooConstForMethod { |
476ff2be SL |
23 | 23 | | //~^ ERROR E0046 |
24 | 24 | | //~| NOTE missing `bar` in implementation | |
25 | 25 | | const bar: u64 = 1; | |
cc61c64b | 26 | ... | |
476ff2be SL |
27 | 28 | | const MY_CONST: u32 = 1; |
28 | 29 | | } | |
cc61c64b | 29 | | |_^ missing `bar` in implementation |
476ff2be SL |
30 | |
31 | error[E0324]: item `MY_CONST` is an associated method, which doesn't match its trait `Foo` | |
32 | --> $DIR/impl-wrong-item-for-trait.rs:37:5 | |
33 | | | |
34 | 17 | const MY_CONST: u32; | |
35 | | -------------------- item in trait | |
36 | ... | |
37 | 37 | fn MY_CONST() {} | |
38 | | ^^^^^^^^^^^^^^^^ does not match trait | |
39 | ||
40 | error[E0046]: not all trait items implemented, missing: `MY_CONST` | |
41 | --> $DIR/impl-wrong-item-for-trait.rs:33:1 | |
42 | | | |
43 | 17 | const MY_CONST: u32; | |
44 | | -------------------- `MY_CONST` from trait | |
45 | ... | |
cc61c64b | 46 | 33 | / impl Foo for FooMethodForConst { |
476ff2be SL |
47 | 34 | | //~^ ERROR E0046 |
48 | 35 | | //~| NOTE missing `MY_CONST` in implementation | |
49 | 36 | | fn bar(&self) {} | |
cc61c64b | 50 | ... | |
476ff2be SL |
51 | 39 | | //~| NOTE does not match trait |
52 | 40 | | } | |
cc61c64b | 53 | | |_^ missing `MY_CONST` in implementation |
476ff2be SL |
54 | |
55 | error[E0325]: item `bar` is an associated type, which doesn't match its trait `Foo` | |
56 | --> $DIR/impl-wrong-item-for-trait.rs:47:5 | |
57 | | | |
58 | 16 | fn bar(&self); | |
59 | | -------------- item in trait | |
60 | ... | |
61 | 47 | type bar = u64; | |
62 | | ^^^^^^^^^^^^^^^ does not match trait | |
63 | ||
64 | error[E0046]: not all trait items implemented, missing: `bar` | |
65 | --> $DIR/impl-wrong-item-for-trait.rs:44:1 | |
66 | | | |
67 | 16 | fn bar(&self); | |
68 | | -------------- `bar` from trait | |
69 | ... | |
cc61c64b | 70 | 44 | / impl Foo for FooTypeForMethod { |
476ff2be SL |
71 | 45 | | //~^ ERROR E0046 |
72 | 46 | | //~| NOTE missing `bar` in implementation | |
73 | 47 | | type bar = u64; | |
cc61c64b | 74 | ... | |
476ff2be SL |
75 | 50 | | const MY_CONST: u32 = 1; |
76 | 51 | | } | |
cc61c64b | 77 | | |_^ missing `bar` in implementation |
476ff2be SL |
78 | |
79 | error[E0046]: not all trait items implemented, missing: `fmt` | |
80 | --> $DIR/impl-wrong-item-for-trait.rs:53:1 | |
81 | | | |
cc61c64b | 82 | 53 | / impl Debug for FooTypeForMethod { |
476ff2be | 83 | 54 | | } |
cc61c64b | 84 | | |_^ missing `fmt` in implementation |
476ff2be SL |
85 | | |
86 | = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` | |
87 | ||
7cac9316 | 88 | error: aborting due to previous error(s) |
476ff2be | 89 |