]>
Commit | Line | Data |
---|---|---|
1 | #[derive(Debug)] | |
2 | struct Pair<T, V> (T, V); | |
3 | ||
4 | impl Pair< | |
5 | &str, | |
6 | isize | |
7 | > { | |
8 | fn say(self: &Pair<&str, isize>) { | |
9 | //~^ ERROR mismatched `self` parameter type | |
10 | //~| ERROR mismatched `self` parameter type | |
11 | println!("{:?}", self); | |
12 | } | |
13 | } | |
14 | ||
15 | fn main() { | |
16 | let result = &Pair("shane", 1); | |
17 | result.say(); | |
18 | } |