2019-12-22 21:53:01 +00:00
|
|
|
error: `impl` item signature doesn't match `trait` item signature
|
|
|
|
--> $DIR/trait-param-without-lifetime-constraint.rs:14:5
|
|
|
|
|
|
|
|
|
LL | pub trait HaveRelationship<To> {
|
2020-02-17 01:59:29 +00:00
|
|
|
| -- this type parameter might not have a lifetime compatible with the `impl`
|
2019-12-22 21:53:01 +00:00
|
|
|
LL | fn get_relation(&self) -> To;
|
2020-02-17 01:59:29 +00:00
|
|
|
| -----------------------------
|
|
|
|
| | |
|
|
|
|
| | you might want to borrow this type parameter in the trait to make it match the `impl`
|
|
|
|
| expected `fn(&Article) -> &ProofReader`
|
2019-12-22 21:53:01 +00:00
|
|
|
...
|
|
|
|
LL | fn get_relation(&self) -> &ProofReader {
|
2020-02-17 01:59:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&Article) -> &ProofReader`
|
2019-12-22 21:53:01 +00:00
|
|
|
|
|
|
|
|
= note: expected `fn(&Article) -> &ProofReader`
|
|
|
|
found `fn(&Article) -> &ProofReader`
|
2019-12-23 01:53:50 +00:00
|
|
|
= note: the lifetime requirements from the `trait` could not be satisfied by the `impl`
|
2019-12-22 21:53:01 +00:00
|
|
|
= 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
|
|
|
|
|