fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.2 KiB66 linesraw
1error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo`
2  --> $DIR/impl-wrong-item-for-trait.rs:12:5
3   |
4LL |     fn bar(&self);
5   |     -------------- item in trait
6...
7LL |     const bar: u64 = 1;
8   |     ^^^^^^^^^^^^^^^^^^^ does not match trait
9
10error[E0324]: item `MY_CONST` is an associated method, which doesn't match its trait `Foo`
11  --> $DIR/impl-wrong-item-for-trait.rs:22:5
12   |
13LL |     const MY_CONST: u32;
14   |     -------------------- item in trait
15...
16LL |     fn MY_CONST() {}
17   |     ^^^^^^^^^^^^^^^^ does not match trait
18
19error[E0325]: item `bar` is an associated type, which doesn't match its trait `Foo`
20  --> $DIR/impl-wrong-item-for-trait.rs:30:5
21   |
22LL |     fn bar(&self);
23   |     -------------- item in trait
24...
25LL |     type bar = u64;
26   |     ^^^^^^^^^^^^^^^ does not match trait
27
28error[E0046]: not all trait items implemented, missing: `bar`
29  --> $DIR/impl-wrong-item-for-trait.rs:10:1
30   |
31LL |     fn bar(&self);
32   |     -------------- `bar` from trait
33...
34LL | impl Foo for FooConstForMethod {
35   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation
36
37error[E0046]: not all trait items implemented, missing: `MY_CONST`
38  --> $DIR/impl-wrong-item-for-trait.rs:19:1
39   |
40LL |     const MY_CONST: u32;
41   |     ------------------- `MY_CONST` from trait
42...
43LL | impl Foo for FooMethodForConst {
44   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `MY_CONST` in implementation
45
46error[E0046]: not all trait items implemented, missing: `bar`
47  --> $DIR/impl-wrong-item-for-trait.rs:28:1
48   |
49LL |     fn bar(&self);
50   |     -------------- `bar` from trait
51...
52LL | impl Foo for FooTypeForMethod {
53   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation
54
55error[E0046]: not all trait items implemented, missing: `fmt`
56  --> $DIR/impl-wrong-item-for-trait.rs:35:1
57   |
58LL | impl Debug for FooTypeForMethod {}
59   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation
60   |
61   = help: implement the missing item: `fn fmt(&self, _: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { todo!() }`
62
63error: aborting due to 7 previous errors
64
65Some errors have detailed explanations: E0046, E0323, E0324, E0325.
66For more information about an error, try `rustc --explain E0046`.