]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/private-method.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / private-method.rs
index 1fab77cb5c8672d01ca59b506ded367e1faffc14..b64ca955cde6d3d60b2052d6ff28b7cd31851739 100644 (file)
@@ -9,20 +9,20 @@
 // except according to those terms.
 
 struct cat {
-    priv meows : uint,
+    meows : uint,
 
     how_hungry : int,
 }
 
-pub impl cat {
-    fn play(&mut self) {
+impl cat {
+    pub fn play(&mut self) {
         self.meows += 1u;
         self.nap();
     }
 }
 
-priv impl cat {
-    fn nap(&mut self) { for uint::range(1u, 10u) |_i| { }}
+impl cat {
+    fn nap(&mut self) { for _ in range(1u, 10u) { } }
 }
 
 fn cat(in_x : uint, in_y : int) -> cat {