1 // run-pass 2 struct Foo { 3 x: isize, 4 } 5 6 trait Stuff { printme(&self)7 fn printme(&self); 8 } 9 10 impl Stuff for Foo { printme(&self)11 fn printme(&self) { 12 println!("{}", self.x); 13 } 14 } 15 main()16 pub fn main() { 17 let x = Foo { x: 3 }; 18 x.printme(); 19 } 20