]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/impl-wrong-item-for-trait.stderr
Rollup merge of #87922 - Manishearth:c-enum-target-spec, r=nagisa,eddyb
[rust.git] / src / test / ui / span / impl-wrong-item-for-trait.stderr
1 error[E0437]: type `bar` is not a member of trait `Foo`
2   --> $DIR/impl-wrong-item-for-trait.rs:30:5
3    |
4 LL |     type bar = u64;
5    |     ^^^^^^^^^^^^^^^ not a member of trait `Foo`
6
7 error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo`
8   --> $DIR/impl-wrong-item-for-trait.rs:12:5
9    |
10 LL |     fn bar(&self);
11    |     -------------- item in trait
12 ...
13 LL |     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:10:1
18    |
19 LL |     fn bar(&self);
20    |     -------------- `bar` from trait
21 ...
22 LL | impl Foo for FooConstForMethod {
23    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation
24
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
34 error[E0046]: not all trait items implemented, missing: `MY_CONST`
35   --> $DIR/impl-wrong-item-for-trait.rs:19:1
36    |
37 LL |     const MY_CONST: u32;
38    |     -------------------- `MY_CONST` from trait
39 ...
40 LL | impl Foo for FooMethodForConst {
41    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `MY_CONST` in implementation
42
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
52 error[E0046]: not all trait items implemented, missing: `bar`
53   --> $DIR/impl-wrong-item-for-trait.rs:28:1
54    |
55 LL |     fn bar(&self);
56    |     -------------- `bar` from trait
57 ...
58 LL | impl Foo for FooTypeForMethod {
59    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation
60
61 error[E0046]: not all trait items implemented, missing: `fmt`
62   --> $DIR/impl-wrong-item-for-trait.rs:36:1
63    |
64 LL | impl Debug for FooTypeForMethod {
65    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation
66    |
67    = help: implement the missing item: `fn fmt(&self, _: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { todo!() }`
68
69 error: aborting due to 8 previous errors
70
71 Some errors have detailed explanations: E0046, E0323, E0324, E0325, E0437.
72 For more information about an error, try `rustc --explain E0046`.