]> git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/trait-param-without-lifetime-constraint.rs
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / traits / trait-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() {}