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> {
|
2019-12-23 01:53:50 +00:00
|
|
|
| -- for `impl` items to implement the method, this type parameter might need a lifetime restriction like `To: 'a`
|
2019-12-22 21:53:01 +00:00
|
|
|
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`
|
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
|
|
|
|
|