blob: 94310382dd0b772138f35b5e01d954af8d10f422 [file] [log] [blame] [edit]
//@ run-pass
struct S {
x: String
}
impl S {
pub fn foo(self) {
self.bar();
}
pub fn bar(self) {
println!("{}", self.x);
}
}
pub fn main() {
let x = S { x: "Hello!".to_string() };
x.foo();
}