about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-02-25 15:14:33 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-02-25 15:15:20 -0800
commita08eda4b6318af0df153322d10d9b907b13d0cdc (patch)
tree487ed73911932b257735a158a4c0cea557187413
parent4b9b32839e6693d6009528658d282f69777d972e (diff)
test: Residual de-muting of the test suite. rs=demuting
-rw-r--r--src/test/auxiliary/cci_class.rs2
-rw-r--r--src/test/auxiliary/cci_class_2.rs2
-rw-r--r--src/test/auxiliary/cci_class_3.rs6
-rw-r--r--src/test/auxiliary/cci_class_4.rs27
-rw-r--r--src/test/auxiliary/cci_class_6.rs8
-rw-r--r--src/test/auxiliary/cci_class_cast.rs10
-rw-r--r--src/test/auxiliary/cci_class_trait.rs2
-rw-r--r--src/test/run-pass/class-cast-to-trait.rs16
-rw-r--r--src/test/run-pass/class-impl-very-parameterized-trait.rs13
-rw-r--r--src/test/run-pass/class-implement-trait-cross-crate.rs42
-rw-r--r--src/test/run-pass/class-implement-traits.rs45
-rw-r--r--src/test/run-pass/class-methods-cross-crate.rs12
-rw-r--r--src/test/run-pass/class-methods.rs13
-rw-r--r--src/test/run-pass/class-poly-methods-cross-crate.rs4
-rw-r--r--src/test/run-pass/class-poly-methods.rs18
-rw-r--r--src/test/run-pass/class-separate-impl.rs43
-rw-r--r--src/test/run-pass/class-typarams.rs14
-rw-r--r--src/test/run-pass/classes-cross-crate.rs10
-rw-r--r--src/test/run-pass/classes-simple-method.rs10
-rw-r--r--src/test/run-pass/classes-simple.rs9
-rw-r--r--src/test/run-pass/classes.rs44
-rw-r--r--src/test/run-pass/private-class-field.rs10
22 files changed, 174 insertions, 186 deletions
diff --git a/src/test/auxiliary/cci_class.rs b/src/test/auxiliary/cci_class.rs
index 3d39aeffa0a..e27fc68df9c 100644
--- a/src/test/auxiliary/cci_class.rs
+++ b/src/test/auxiliary/cci_class.rs
@@ -10,7 +10,7 @@
 
 pub mod kitties {
     pub struct cat {
-      priv mut meows : uint,
+      priv meows : uint,
 
       how_hungry : int,
     }
diff --git a/src/test/auxiliary/cci_class_2.rs b/src/test/auxiliary/cci_class_2.rs
index 47cbed741cd..b955ed9c2a7 100644
--- a/src/test/auxiliary/cci_class_2.rs
+++ b/src/test/auxiliary/cci_class_2.rs
@@ -10,7 +10,7 @@
 
 pub mod kitties {
     pub struct cat {
-      priv mut meows : uint,
+      priv meows : uint,
 
       how_hungry : int,
 
diff --git a/src/test/auxiliary/cci_class_3.rs b/src/test/auxiliary/cci_class_3.rs
index ae224684c84..a516f5398df 100644
--- a/src/test/auxiliary/cci_class_3.rs
+++ b/src/test/auxiliary/cci_class_3.rs
@@ -10,14 +10,14 @@
 
 pub mod kitties {
     pub struct cat {
-        priv mut meows : uint,
+        priv meows : uint,
 
         how_hungry : int,
     }
 
     pub impl cat {
-        fn speak() { self.meows += 1u; }
-        fn meow_count() -> uint { self.meows }
+        fn speak(&mut self) { self.meows += 1u; }
+        fn meow_count(&mut self) -> uint { self.meows }
     }
 
     pub fn cat(in_x : uint, in_y : int) -> cat {
diff --git a/src/test/auxiliary/cci_class_4.rs b/src/test/auxiliary/cci_class_4.rs
index 127562309ce..68143b32741 100644
--- a/src/test/auxiliary/cci_class_4.rs
+++ b/src/test/auxiliary/cci_class_4.rs
@@ -10,30 +10,29 @@
 
 pub mod kitties {
     pub struct cat {
-        priv mut meows : uint,
+        priv meows : uint,
 
-        mut how_hungry : int,
+        how_hungry : int,
         name : ~str,
     }
 
     pub impl cat {
-      fn speak() { self.meow(); }
+        fn speak(&mut self) { self.meow(); }
 
-      fn eat() -> bool {
-        if self.how_hungry > 0 {
-            error!("OM NOM NOM");
-            self.how_hungry -= 2;
-            return true;
-        }
-        else {
-            error!("Not hungry!");
-            return false;
+        fn eat(&mut self) -> bool {
+            if self.how_hungry > 0 {
+                error!("OM NOM NOM");
+                self.how_hungry -= 2;
+                return true;
+            } else {
+                error!("Not hungry!");
+                return false;
+            }
         }
-      }
     }
 
     pub impl cat {
-        fn meow() {
+        fn meow(&mut self) {
             error!("Meow");
             self.meows += 1u;
             if self.meows % 5u == 0u {
diff --git a/src/test/auxiliary/cci_class_6.rs b/src/test/auxiliary/cci_class_6.rs
index 3ab101bc0b4..ceccea409c4 100644
--- a/src/test/auxiliary/cci_class_6.rs
+++ b/src/test/auxiliary/cci_class_6.rs
@@ -10,17 +10,17 @@
 
 pub mod kitties {
     pub struct cat<U> {
-        priv mut info : ~[U],
-        priv mut meows : uint,
+        priv info : ~[U],
+        priv meows : uint,
 
         how_hungry : int,
     }
 
     pub impl<U> cat<U> {
-        fn speak<T>(stuff: ~[T]) {
+        fn speak<T>(&mut self, stuff: ~[T]) {
             self.meows += stuff.len();
         }
-        fn meow_count() -> uint { self.meows }
+        fn meow_count(&mut self) -> uint { self.meows }
     }
 
     pub fn cat<U>(in_x : uint, in_y : int, -in_info: ~[U]) -> cat<U> {
diff --git a/src/test/auxiliary/cci_class_cast.rs b/src/test/auxiliary/cci_class_cast.rs
index 5256944b18e..a2896dad814 100644
--- a/src/test/auxiliary/cci_class_cast.rs
+++ b/src/test/auxiliary/cci_class_cast.rs
@@ -12,8 +12,8 @@ use core::to_str::*;
 
 pub mod kitty {
     pub struct cat {
-      priv mut meows : uint,
-      mut how_hungry : int,
+      priv meows : uint,
+      how_hungry : int,
       name : ~str,
     }
 
@@ -22,7 +22,7 @@ pub mod kitty {
     }
 
     priv impl cat {
-        fn meow() {
+        fn meow(&mut self) {
             error!("Meow");
             self.meows += 1u;
             if self.meows % 5u == 0u {
@@ -33,9 +33,9 @@ pub mod kitty {
     }
 
     pub impl cat {
-        fn speak() { self.meow(); }
+        fn speak(&mut self) { self.meow(); }
 
-        fn eat() -> bool {
+        fn eat(&mut self) -> bool {
             if self.how_hungry > 0 {
                 error!("OM NOM NOM");
                 self.how_hungry -= 2;
diff --git a/src/test/auxiliary/cci_class_trait.rs b/src/test/auxiliary/cci_class_trait.rs
index 0363e1afd60..7ca3d7c4ac9 100644
--- a/src/test/auxiliary/cci_class_trait.rs
+++ b/src/test/auxiliary/cci_class_trait.rs
@@ -10,6 +10,6 @@
 
 pub mod animals {
     pub trait noisy {
-        fn speak();
+        fn speak(&mut self);
     }
 }
diff --git a/src/test/run-pass/class-cast-to-trait.rs b/src/test/run-pass/class-cast-to-trait.rs
index cb2e56d7f6e..157ea586c2c 100644
--- a/src/test/run-pass/class-cast-to-trait.rs
+++ b/src/test/run-pass/class-cast-to-trait.rs
@@ -9,21 +9,21 @@
 // except according to those terms.
 
 trait noisy {
-  fn speak();
+  fn speak(&mut self);
 }
 
 struct cat {
-  priv mut meows : uint,
-  mut how_hungry : int,
-  name : ~str,
+  priv meows: uint,
+  how_hungry: int,
+  name: ~str,
 }
 
 impl noisy for cat {
-  fn speak() { self.meow(); }
+  fn speak(&mut self) { self.meow(); }
 }
 
 impl cat {
-  fn eat() -> bool {
+  fn eat(&mut self) -> bool {
     if self.how_hungry > 0 {
         error!("OM NOM NOM");
         self.how_hungry -= 2;
@@ -37,7 +37,7 @@ impl cat {
 }
 
 priv impl cat {
-    fn meow() {
+    fn meow(&mut self) {
       error!("Meow");
       self.meows += 1u;
       if self.meows % 5u == 0u {
@@ -56,6 +56,6 @@ fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat {
 
 
 pub fn main() {
-  let nyan : noisy  = cat(0u, 2, ~"nyan") as noisy;
+  let mut nyan: noisy = cat(0u, 2, ~"nyan") as noisy;
   nyan.speak();
 }
diff --git a/src/test/run-pass/class-impl-very-parameterized-trait.rs b/src/test/run-pass/class-impl-very-parameterized-trait.rs
index 09cf008fd09..40f728d40bf 100644
--- a/src/test/run-pass/class-impl-very-parameterized-trait.rs
+++ b/src/test/run-pass/class-impl-very-parameterized-trait.rs
@@ -28,9 +28,9 @@ impl cmp::Eq for cat_type {
 // ok: T should be in scope when resolving the trait ref for map
 struct cat<T> {
     // Yes, you can have negative meows
-    priv mut meows : int,
+    priv meows : int,
 
-    mut how_hungry : int,
+    how_hungry : int,
     name : T,
 }
 
@@ -95,11 +95,10 @@ impl<T> Map<int, T> for cat<T> {
     }
 
     fn remove(&mut self, k: &int) -> bool {
-        match self.find(k) {
-          Some(_) => {
-              self.meows -= *k; true
-          }
-          None => { false }
+        if self.find(k).is_some() {
+            self.meows -= *k; true
+        } else {
+            false
         }
     }
 }
diff --git a/src/test/run-pass/class-implement-trait-cross-crate.rs b/src/test/run-pass/class-implement-trait-cross-crate.rs
index 155090b44df..aa7bb738bf5 100644
--- a/src/test/run-pass/class-implement-trait-cross-crate.rs
+++ b/src/test/run-pass/class-implement-trait-cross-crate.rs
@@ -14,39 +14,37 @@ extern mod cci_class_trait;
 use cci_class_trait::animals::*;
 
 struct cat {
-  priv mut meows : uint,
+  priv meows: uint,
 
-  mut how_hungry : int,
+  how_hungry : int,
   name : ~str,
 }
 
 impl cat {
-  fn eat() -> bool {
-    if self.how_hungry > 0 {
-        error!("OM NOM NOM");
-        self.how_hungry -= 2;
-        return true;
+    fn eat(&mut self) -> bool {
+        if self.how_hungry > 0 {
+            error!("OM NOM NOM");
+            self.how_hungry -= 2;
+            return true;
+        }
+        else {
+            error!("Not hungry!");
+            return false;
+        }
     }
-    else {
-        error!("Not hungry!");
-        return false;
-    }
-  }
 }
 
 impl noisy for cat {
-
-  fn speak() { self.meow(); }
-
+    fn speak(&mut self) { self.meow(); }
 }
 
 priv impl cat {
-    fn meow() {
-      error!("Meow");
-      self.meows += 1u;
-      if self.meows % 5u == 0u {
-          self.how_hungry += 1;
-      }
+    fn meow(&mut self) {
+        error!("Meow");
+        self.meows += 1u;
+        if self.meows % 5u == 0u {
+            self.how_hungry += 1;
+        }
     }
 }
 
@@ -60,7 +58,7 @@ fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat {
 
 
 pub fn main() {
-  let nyan = cat(0u, 2, ~"nyan");
+  let mut nyan = cat(0u, 2, ~"nyan");
   nyan.eat();
   assert(!nyan.eat());
   for uint::range(1u, 10u) |_i| { nyan.speak(); };
diff --git a/src/test/run-pass/class-implement-traits.rs b/src/test/run-pass/class-implement-traits.rs
index 15564d73e1f..bdc8f7568a1 100644
--- a/src/test/run-pass/class-implement-traits.rs
+++ b/src/test/run-pass/class-implement-traits.rs
@@ -12,42 +12,41 @@
 #[legacy_modes];
 
 trait noisy {
-  fn speak();
+  fn speak(&mut self);
 }
 
 struct cat {
-  priv mut meows : uint,
+    priv meows : uint,
 
-  mut how_hungry : int,
-  name : ~str,
+    how_hungry : int,
+    name : ~str,
 }
 
 priv impl cat {
-    fn meow() {
-      error!("Meow");
-      self.meows += 1u;
-      if self.meows % 5u == 0u {
-          self.how_hungry += 1;
-      }
+    fn meow(&mut self) {
+        error!("Meow");
+        self.meows += 1u;
+        if self.meows % 5u == 0u {
+            self.how_hungry += 1;
+        }
     }
 }
 
 impl cat {
-  fn eat() -> bool {
-    if self.how_hungry > 0 {
-        error!("OM NOM NOM");
-        self.how_hungry -= 2;
-        return true;
+    fn eat(&mut self) -> bool {
+        if self.how_hungry > 0 {
+            error!("OM NOM NOM");
+            self.how_hungry -= 2;
+            return true;
+        } else {
+            error!("Not hungry!");
+            return false;
+        }
     }
-    else {
-        error!("Not hungry!");
-        return false;
-    }
-  }
 }
 
 impl noisy for cat {
-  fn speak() { self.meow(); }
+  fn speak(&mut self) { self.meow(); }
 }
 
 fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat {
@@ -59,12 +58,12 @@ fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat {
 }
 
 
-fn make_speak<C:noisy>(c: C) {
+fn make_speak<C:noisy>(mut c: C) {
     c.speak();
 }
 
 pub fn main() {
-  let nyan = cat(0u, 2, ~"nyan");
+  let mut nyan = cat(0u, 2, ~"nyan");
   nyan.eat();
   assert(!nyan.eat());
   for uint::range(1u, 10u) |_i| { make_speak(nyan); };
diff --git a/src/test/run-pass/class-methods-cross-crate.rs b/src/test/run-pass/class-methods-cross-crate.rs
index b555abb6ec5..fc5191e522d 100644
--- a/src/test/run-pass/class-methods-cross-crate.rs
+++ b/src/test/run-pass/class-methods-cross-crate.rs
@@ -14,10 +14,10 @@ extern mod cci_class_3;
 use cci_class_3::kitties::*;
 
 pub fn main() {
-  let nyan : cat = cat(52u, 99);
-  let kitty = cat(1000u, 2);
-  assert(nyan.how_hungry == 99);
-  assert(kitty.how_hungry == 2);
-  nyan.speak();
-  assert(nyan.meow_count() == 53u);
+    let mut nyan : cat = cat(52u, 99);
+    let mut kitty = cat(1000u, 2);
+    assert(nyan.how_hungry == 99);
+    assert(kitty.how_hungry == 2);
+    nyan.speak();
+    assert(nyan.meow_count() == 53u);
 }
diff --git a/src/test/run-pass/class-methods.rs b/src/test/run-pass/class-methods.rs
index fa43968da0a..1e41b60a822 100644
--- a/src/test/run-pass/class-methods.rs
+++ b/src/test/run-pass/class-methods.rs
@@ -9,18 +9,17 @@
 // except according to those terms.
 
 struct cat {
-  priv mut meows : uint,
+  priv meows : uint,
 
   how_hungry : int,
 }
 
 impl cat {
-
-  fn speak() { self.meows += 1u; }
-  fn meow_count() -> uint { self.meows }
+    fn speak(&mut self) { self.meows += 1u; }
+    fn meow_count(&mut self) -> uint { self.meows }
 }
 
-fn cat(in_x : uint, in_y : int) -> cat {
+fn cat(in_x: uint, in_y: int) -> cat {
     cat {
         meows: in_x,
         how_hungry: in_y
@@ -28,8 +27,8 @@ fn cat(in_x : uint, in_y : int) -> cat {
 }
 
 pub fn main() {
-  let nyan : cat = cat(52u, 99);
-  let kitty = cat(1000u, 2);
+  let mut nyan: cat = cat(52u, 99);
+  let mut kitty = cat(1000u, 2);
   assert(nyan.how_hungry == 99);
   assert(kitty.how_hungry == 2);
   nyan.speak();
diff --git a/src/test/run-pass/class-poly-methods-cross-crate.rs b/src/test/run-pass/class-poly-methods-cross-crate.rs
index b0f5b916dd4..a96a1920d92 100644
--- a/src/test/run-pass/class-poly-methods-cross-crate.rs
+++ b/src/test/run-pass/class-poly-methods-cross-crate.rs
@@ -14,8 +14,8 @@ extern mod cci_class_6;
 use cci_class_6::kitties::*;
 
 pub fn main() {
-  let nyan : cat<char> = cat::<char>(52u, 99, ~['p']);
-  let kitty = cat(1000u, 2, ~[~"tabby"]);
+  let mut nyan : cat<char> = cat::<char>(52u, 99, ~['p']);
+  let mut kitty = cat(1000u, 2, ~[~"tabby"]);
   assert(nyan.how_hungry == 99);
   assert(kitty.how_hungry == 2);
   nyan.speak(~[1u,2u,3u]);
diff --git a/src/test/run-pass/class-poly-methods.rs b/src/test/run-pass/class-poly-methods.rs
index 5ef5e55b729..e81d07a783b 100644
--- a/src/test/run-pass/class-poly-methods.rs
+++ b/src/test/run-pass/class-poly-methods.rs
@@ -9,17 +9,17 @@
 // except according to those terms.
 
 struct cat<U> {
-  priv mut info : ~[U],
-  priv mut meows : uint,
+    priv info : ~[U],
+    priv meows : uint,
 
-  how_hungry : int,
+    how_hungry : int,
 }
 
 impl<U> cat<U> {
-  fn speak<T>(stuff: ~[T]) {
-    self.meows += stuff.len();
-  }
-  fn meow_count() -> uint { self.meows }
+    fn speak<T>(&mut self, stuff: ~[T]) {
+        self.meows += stuff.len();
+    }
+    fn meow_count(&mut self) -> uint { self.meows }
 }
 
 fn cat<U>(in_x : uint, in_y : int, -in_info: ~[U]) -> cat<U> {
@@ -31,8 +31,8 @@ fn cat<U>(in_x : uint, in_y : int, -in_info: ~[U]) -> cat<U> {
 }
 
 pub fn main() {
-  let nyan : cat<int> = cat::<int>(52u, 99, ~[9]);
-  let kitty = cat(1000u, 2, ~[~"tabby"]);
+  let mut nyan : cat<int> = cat::<int>(52u, 99, ~[9]);
+  let mut kitty = cat(1000u, 2, ~[~"tabby"]);
   assert(nyan.how_hungry == 99);
   assert(kitty.how_hungry == 2);
   nyan.speak(~[1,2,3]);
diff --git a/src/test/run-pass/class-separate-impl.rs b/src/test/run-pass/class-separate-impl.rs
index fda358a86a2..9c7d9ce7415 100644
--- a/src/test/run-pass/class-separate-impl.rs
+++ b/src/test/run-pass/class-separate-impl.rs
@@ -12,36 +12,35 @@
 use core::to_str::*;
 
 struct cat {
-  priv mut meows : uint,
+    priv meows : uint,
 
-  mut how_hungry : int,
-  name : ~str,
+    how_hungry : int,
+    name : ~str,
 }
 
 impl cat {
+    fn speak(&mut self) { self.meow(); }
 
-  fn speak() { self.meow(); }
-
-  fn eat() -> bool {
-    if self.how_hungry > 0 {
-        error!("OM NOM NOM");
-        self.how_hungry -= 2;
-        return true;
-    }
-    else {
-        error!("Not hungry!");
-        return false;
+    fn eat(&mut self) -> bool {
+        if self.how_hungry > 0 {
+            error!("OM NOM NOM");
+            self.how_hungry -= 2;
+            return true;
+        }
+        else {
+            error!("Not hungry!");
+            return false;
+        }
     }
-  }
 }
 
 priv impl cat {
-    fn meow() {
-      error!("Meow");
-      self.meows += 1u;
-      if self.meows % 5u == 0u {
-          self.how_hungry += 1;
-      }
+    fn meow(&mut self) {
+        error!("Meow");
+        self.meows += 1u;
+        if self.meows % 5u == 0u {
+            self.how_hungry += 1;
+        }
     }
 }
 
@@ -64,6 +63,6 @@ fn print_out<T:ToStr>(thing: T, expected: ~str) {
 }
 
 pub fn main() {
-  let nyan : ToStr = cat(0u, 2, ~"nyan") as ToStr;
+  let mut nyan : ToStr = cat(0u, 2, ~"nyan") as ToStr;
   print_out(nyan, ~"nyan");
 }
diff --git a/src/test/run-pass/class-typarams.rs b/src/test/run-pass/class-typarams.rs
index b8d0e593286..cbc69719caa 100644
--- a/src/test/run-pass/class-typarams.rs
+++ b/src/test/run-pass/class-typarams.rs
@@ -9,16 +9,14 @@
 // except according to those terms.
 
 struct cat<U> {
-  priv mut meows : uint,
+    priv meows : uint,
 
-  how_hungry : int,
+    how_hungry : int,
 }
 
 impl<U> cat<U> {
-  fn speak() {
-    self.meows += 1u;
-  }
-  fn meow_count() -> uint { self.meows }
+    fn speak(&mut self) { self.meows += 1u; }
+    fn meow_count(&mut self) -> uint { self.meows }
 }
 
 fn cat<U>(in_x : uint, in_y : int) -> cat<U> {
@@ -30,6 +28,6 @@ fn cat<U>(in_x : uint, in_y : int) -> cat<U> {
 
 
 pub fn main() {
-  let _nyan : cat<int> = cat::<int>(52u, 99);
-  //  let kitty = cat(1000u, 2);
+  let mut _nyan : cat<int> = cat::<int>(52u, 99);
+  //  let mut kitty = cat(1000u, 2);
 }
diff --git a/src/test/run-pass/classes-cross-crate.rs b/src/test/run-pass/classes-cross-crate.rs
index d40f948431e..2ab6ce01b24 100644
--- a/src/test/run-pass/classes-cross-crate.rs
+++ b/src/test/run-pass/classes-cross-crate.rs
@@ -14,9 +14,9 @@ extern mod cci_class_4;
 use cci_class_4::kitties::*;
 
 pub fn main() {
-  let nyan = cat(0u, 2, ~"nyan");
-  nyan.eat();
-  assert(!nyan.eat());
-  for uint::range(1u, 10u) |_i| { nyan.speak(); };
-  assert(nyan.eat());
+    let mut nyan = cat(0u, 2, ~"nyan");
+    nyan.eat();
+    assert(!nyan.eat());
+    for uint::range(1u, 10u) |_i| { nyan.speak(); };
+    assert(nyan.eat());
 }
diff --git a/src/test/run-pass/classes-simple-method.rs b/src/test/run-pass/classes-simple-method.rs
index f44ee4bd502..ac80ca9b9e9 100644
--- a/src/test/run-pass/classes-simple-method.rs
+++ b/src/test/run-pass/classes-simple-method.rs
@@ -9,13 +9,13 @@
 // except according to those terms.
 
 struct cat {
-  priv mut meows : uint,
+    priv meows : uint,
 
-  how_hungry : int,
+    how_hungry : int,
 }
 
 impl cat {
-  fn speak() {}
+  fn speak(&mut self) {}
 }
 
 fn cat(in_x : uint, in_y : int) -> cat {
@@ -26,8 +26,8 @@ fn cat(in_x : uint, in_y : int) -> cat {
 }
 
 pub fn main() {
-  let nyan : cat = cat(52u, 99);
-  let kitty = cat(1000u, 2);
+  let mut nyan : cat = cat(52u, 99);
+  let mut kitty = cat(1000u, 2);
   assert(nyan.how_hungry == 99);
   assert(kitty.how_hungry == 2);
   nyan.speak();
diff --git a/src/test/run-pass/classes-simple.rs b/src/test/run-pass/classes-simple.rs
index 3520719d499..b17e81160e5 100644
--- a/src/test/run-pass/classes-simple.rs
+++ b/src/test/run-pass/classes-simple.rs
@@ -9,10 +9,9 @@
 // except according to those terms.
 
 struct cat {
-  priv mut meows : uint,
-
-  how_hungry : int,
+    priv meows : uint,
 
+    how_hungry : int,
 }
 
 fn cat(in_x : uint, in_y : int) -> cat {
@@ -23,8 +22,8 @@ fn cat(in_x : uint, in_y : int) -> cat {
 }
 
 pub fn main() {
-  let nyan : cat = cat(52u, 99);
-  let kitty = cat(1000u, 2);
+  let mut nyan : cat = cat(52u, 99);
+  let mut kitty = cat(1000u, 2);
   assert(nyan.how_hungry == 99);
   assert(kitty.how_hungry == 2);
 }
diff --git a/src/test/run-pass/classes.rs b/src/test/run-pass/classes.rs
index 808b7cac501..552715dccb4 100644
--- a/src/test/run-pass/classes.rs
+++ b/src/test/run-pass/classes.rs
@@ -9,36 +9,34 @@
 // except according to those terms.
 
 struct cat {
-  priv mut meows : uint,
+    priv meows : uint,
 
-  mut how_hungry : int,
-  name : ~str,
+    how_hungry : int,
+    name : ~str,
 }
 
 impl cat {
-
-  fn speak() { self.meow(); }
-
-  fn eat() -> bool {
-    if self.how_hungry > 0 {
-        error!("OM NOM NOM");
-        self.how_hungry -= 2;
-        return true;
-    }
-    else {
-        error!("Not hungry!");
-        return false;
+    fn speak(&mut self) { self.meow(); }
+
+    fn eat(&mut self) -> bool {
+        if self.how_hungry > 0 {
+            error!("OM NOM NOM");
+            self.how_hungry -= 2;
+            return true;
+        } else {
+            error!("Not hungry!");
+            return false;
+        }
     }
-  }
 }
 
 priv impl cat {
-    fn meow() {
-      error!("Meow");
-      self.meows += 1u;
-      if self.meows % 5u == 0u {
-          self.how_hungry += 1;
-      }
+    fn meow(&mut self) {
+        error!("Meow");
+        self.meows += 1u;
+        if self.meows % 5u == 0u {
+            self.how_hungry += 1;
+        }
     }
 }
 
@@ -51,7 +49,7 @@ fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat {
 }
 
 pub fn main() {
-  let nyan = cat(0u, 2, ~"nyan");
+  let mut nyan = cat(0u, 2, ~"nyan");
   nyan.eat();
   assert(!nyan.eat());
   for uint::range(1u, 10u) |_i| { nyan.speak(); };
diff --git a/src/test/run-pass/private-class-field.rs b/src/test/run-pass/private-class-field.rs
index 3be87fd5047..9cb86ffe837 100644
--- a/src/test/run-pass/private-class-field.rs
+++ b/src/test/run-pass/private-class-field.rs
@@ -9,13 +9,13 @@
 // except according to those terms.
 
 struct cat {
-  priv mut meows : uint,
+    priv meows : uint,
 
-  how_hungry : int,
+    how_hungry : int,
 }
 
 impl cat {
-  fn meow_count() -> uint { self.meows }
+  fn meow_count(&mut self) -> uint { self.meows }
 }
 
 fn cat(in_x : uint, in_y : int) -> cat {
@@ -26,6 +26,6 @@ fn cat(in_x : uint, in_y : int) -> cat {
 }
 
 pub fn main() {
-  let nyan : cat = cat(52u, 99);
-  assert (nyan.meow_count() == 52u);
+    let mut nyan : cat = cat(52u, 99);
+    assert (nyan.meow_count() == 52u);
 }