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