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