]>
Commit | Line | Data |
---|---|---|
f9f354fc XL |
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() {} |