1 // run-pass 2 #![allow(dead_code)] 3 #![allow(non_camel_case_types)] 4 5 // pretty-expanded FIXME #23616 6 7 struct cat { 8 meows : usize, 9 10 how_hungry : isize, 11 } 12 13 impl cat { play(&mut self)14 pub fn play(&mut self) { 15 self.meows += 1_usize; 16 self.nap(); 17 } 18 } 19 20 impl cat { nap(&mut self)21 fn nap(&mut self) { for _ in 1_usize..10_usize { } } 22 } 23 cat(in_x : usize, in_y : isize) -> cat24fn cat(in_x : usize, in_y : isize) -> cat { 25 cat { 26 meows: in_x, 27 how_hungry: in_y 28 } 29 } 30 main()31pub fn main() { 32 let mut nyan : cat = cat(52_usize, 99); 33 nyan.play(); 34 } 35