]> git.proxmox.com Git - rustc.git/blame - 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
CommitLineData
f9f354fc
XL
1struct Article {
2 proof_reader: ProofReader,
3}
4
5struct ProofReader {
6 name: String,
7}
8
9pub trait HaveRelationship<To> {
10 fn get_relation(&self) -> To;
11}
12
13impl 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
20fn main() {}