mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-09 00:17:44 +00:00
19 lines
956 B
Plaintext
19 lines
956 B
Plaintext
![]() |
error: `impl` item signature doesn't match `trait` item signature
|
||
|
--> $DIR/trait-param-without-lifetime-constraint.rs:14:5
|
||
|
|
|
||
|
LL | pub trait HaveRelationship<To> {
|
||
|
| -- in order for `impl` items to be able to implement the method, this type parameter might need a lifetime restriction like `To: 'a`
|
||
|
LL | fn get_relation(&self) -> To;
|
||
|
| ----------------------------- expected fn(&Article) -> &ProofReader
|
||
|
...
|
||
|
LL | fn get_relation(&self) -> &ProofReader {
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found fn(&Article) -> &ProofReader
|
||
|
|
|
||
|
= note: expected `fn(&Article) -> &ProofReader`
|
||
|
found `fn(&Article) -> &ProofReader`
|
||
|
= note: the lifetime requirements from the `trait` could not be fulfilled by the `impl`
|
||
|
= help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
|
||
|
|
||
|
error: aborting due to previous error
|
||
|
|