]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/param-without-lifetime-constraint.stderr
Rollup merge of #106144 - tgross35:patch-1, r=Mark-Simulacrum
[rust.git] / tests / ui / traits / param-without-lifetime-constraint.stderr
1 error: `impl` item signature doesn't match `trait` item signature
2   --> $DIR/param-without-lifetime-constraint.rs:14:5
3    |
4 LL |     fn get_relation(&self) -> To;
5    |     ----------------------------- expected `fn(&'1 Article) -> &'2 ProofReader`
6 ...
7 LL |     fn get_relation(&self) -> &ProofReader {
8    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 Article) -> &'1 ProofReader`
9    |
10    = note: expected signature `fn(&'1 Article) -> &'2 ProofReader`
11               found signature `fn(&'1 Article) -> &'1 ProofReader`
12 help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
13   --> $DIR/param-without-lifetime-constraint.rs:10:31
14    |
15 LL |     fn get_relation(&self) -> To;
16    |                               ^^ consider borrowing this type parameter in the trait
17
18 error: aborting due to previous error
19