]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/impl-wrong-item-for-trait.stderr
Auto merge of #41103 - projektir:channel_error_docs, r=GuillaumeGomez
[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:47:5
3    |
4 47 |     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: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 ...
22 22 |   impl Foo for FooConstForMethod {
23    |  _^ starting here...
24 23 | |     //~^ ERROR E0046
25 24 | |     //~| NOTE missing `bar` in implementation
26 25 | |     const bar: u64 = 1;
27 ...  |
28 28 | |     const MY_CONST: u32 = 1;
29 29 | | }
30    | |_^ ...ending here: missing `bar` in implementation
31
32 error[E0324]: item `MY_CONST` is an associated method, which doesn't match its trait `Foo`
33   --> $DIR/impl-wrong-item-for-trait.rs:37:5
34    |
35 17 |     const MY_CONST: u32;
36    |     -------------------- item in trait
37 ...
38 37 |     fn MY_CONST() {}
39    |     ^^^^^^^^^^^^^^^^ does not match trait
40
41 error[E0046]: not all trait items implemented, missing: `MY_CONST`
42   --> $DIR/impl-wrong-item-for-trait.rs:33:1
43    |
44 17 |       const MY_CONST: u32;
45    |       -------------------- `MY_CONST` from trait
46 ...
47 33 |   impl Foo for FooMethodForConst {
48    |  _^ starting here...
49 34 | |     //~^ ERROR E0046
50 35 | |     //~| NOTE missing `MY_CONST` in implementation
51 36 | |     fn bar(&self) {}
52 ...  |
53 39 | |     //~| NOTE does not match trait
54 40 | | }
55    | |_^ ...ending here: missing `MY_CONST` in implementation
56
57 error[E0325]: item `bar` is an associated type, which doesn't match its trait `Foo`
58   --> $DIR/impl-wrong-item-for-trait.rs:47:5
59    |
60 16 |     fn bar(&self);
61    |     -------------- item in trait
62 ...
63 47 |     type bar = u64;
64    |     ^^^^^^^^^^^^^^^ does not match trait
65
66 error[E0046]: not all trait items implemented, missing: `bar`
67   --> $DIR/impl-wrong-item-for-trait.rs:44:1
68    |
69 16 |       fn bar(&self);
70    |       -------------- `bar` from trait
71 ...
72 44 |   impl Foo for FooTypeForMethod {
73    |  _^ starting here...
74 45 | |     //~^ ERROR E0046
75 46 | |     //~| NOTE missing `bar` in implementation
76 47 | |     type bar = u64;
77 ...  |
78 50 | |     const MY_CONST: u32 = 1;
79 51 | | }
80    | |_^ ...ending here: missing `bar` in implementation
81
82 error[E0046]: not all trait items implemented, missing: `fmt`
83   --> $DIR/impl-wrong-item-for-trait.rs:53:1
84    |
85 53 |   impl Debug for FooTypeForMethod {
86    |  _^ starting here...
87 54 | | }
88    | |_^ ...ending here: missing `fmt` in implementation
89    |
90    = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
91
92 error: aborting due to 7 previous errors
93