2018-10-08 01:13:37 -07:00
|
|
|
//@ run-pass
|
|
|
|
|
2015-01-28 08:34:18 -05:00
|
|
|
#[derive(Debug)]
|
2023-12-27 17:11:58 -05:00
|
|
|
#[allow(dead_code)]
|
2014-12-07 15:22:06 +00:00
|
|
|
struct Pair<T, V> (T, V);
|
|
|
|
|
|
|
|
impl Pair<
|
2018-10-08 01:13:37 -07:00
|
|
|
&str,
|
2014-12-05 18:12:25 -08:00
|
|
|
isize
|
2014-12-07 15:22:06 +00:00
|
|
|
> {
|
2018-10-08 01:13:37 -07:00
|
|
|
fn say(&self) {
|
|
|
|
println!("{:?}", self);
|
2014-12-07 15:22:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2015-01-31 17:23:42 +01:00
|
|
|
let result = &Pair("shane", 1);
|
2014-12-07 15:22:06 +00:00
|
|
|
result.say();
|
|
|
|
}
|