mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
19 lines
241 B
Rust
19 lines
241 B
Rust
// run-pass
|
|
|
|
#[derive(Debug)]
|
|
#[allow(dead_code)]
|
|
struct Pair<T, V> (T, V);
|
|
|
|
impl Pair<
|
|
&str,
|
|
isize
|
|
> {
|
|
fn say(&self) {
|
|
println!("{:?}", self);
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
let result = &Pair("shane", 1);
|
|
result.say();
|
|
}
|