rust/src/test/ui/issues/issue-17905-2.rs

19 lines
303 B
Rust
Raw Normal View History

#[derive(Debug)]
struct Pair<T, V> (T, V);
impl Pair<
&str,
isize
> {
fn say(self: &Pair<&str, isize>) {
2018-11-27 10:56:36 +01:00
//~^ ERROR mismatched method receiver
//~| ERROR mismatched method receiver
println!("{:?}", self);
}
}
fn main() {
let result = &Pair("shane", 1);
result.say();
}