trait UseString: std::fmt::Debug {
fn use_string(&self) {
- println!("{:?}", self.get_a()); //~ ERROR no method named `get_a` found for type `&Self`
+ println!("{:?}", self.get_a()); //~ ERROR no method named `get_a` found
}
}
trait UseString2 {
fn use_string(&self) {
- println!("{:?}", self.get_a()); //~ ERROR no method named `get_a` found for type `&Self`
+ println!("{:?}", self.get_a()); //~ ERROR no method named `get_a` found
}
}