]> git.lizzy.rs Git - rust.git/blob - src/test/ui/privacy/private-method-rpass.rs
update ui tests
[rust.git] / src / test / ui / privacy / private-method-rpass.rs
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 {
14     pub fn play(&mut self) {
15         self.meows += 1_usize;
16         self.nap();
17     }
18 }
19
20 impl cat {
21     fn nap(&mut self) { for _ in 1_usize..10_usize { } }
22 }
23
24 fn cat(in_x : usize, in_y : isize) -> cat {
25     cat {
26         meows: in_x,
27         how_hungry: in_y
28     }
29 }
30
31 pub fn main() {
32   let mut nyan : cat = cat(52_usize, 99);
33   nyan.play();
34 }