diff options
Diffstat (limited to 'src/test/ui/privacy/private-class-field.rs')
-rw-r--r-- | src/test/ui/privacy/private-class-field.rs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/test/ui/privacy/private-class-field.rs b/src/test/ui/privacy/private-class-field.rs deleted file mode 100644 index 98e32ee07..000000000 --- a/src/test/ui/privacy/private-class-field.rs +++ /dev/null @@ -1,26 +0,0 @@ -// run-pass -#![allow(dead_code)] -#![allow(non_camel_case_types)] - - -struct cat { - meows : usize, - - how_hungry : isize, -} - -impl cat { - pub fn meow_count(&mut self) -> usize { self.meows } -} - -fn cat(in_x : usize, in_y : isize) -> cat { - cat { - meows: in_x, - how_hungry: in_y - } -} - -pub fn main() { - let mut nyan : cat = cat(52, 99); - assert_eq!(nyan.meow_count(), 52); -} |