rust/src/test/ui/traits/trait-param-without-lifetime-constraint.stderr

19 lines
936 B
Plaintext
Raw Normal View History

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`
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`
= 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