]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/param-without-lifetime-constraint.rs
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / traits / param-without-lifetime-constraint.rs
1 struct Article {
2     proof_reader: ProofReader,
3 }
4
5 struct ProofReader {
6     name: String,
7 }
8
9 pub trait HaveRelationship<To> {
10     fn get_relation(&self) -> To;
11 }
12
13 impl HaveRelationship<&ProofReader> for Article {
14     fn get_relation(&self) -> &ProofReader {
15     //~^ ERROR `impl` item signature doesn't match `trait` item signature
16         &self.proof_reader
17     }
18 }
19
20 fn main() {}