about summary refs log tree commit diff
path: root/src/test/compile-fail/class-cast-to-trait.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/compile-fail/class-cast-to-trait.rs')
-rw-r--r--src/test/compile-fail/class-cast-to-trait.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/compile-fail/class-cast-to-trait.rs b/src/test/compile-fail/class-cast-to-trait.rs
index 9133b80aa1e..caa79132182 100644
--- a/src/test/compile-fail/class-cast-to-trait.rs
+++ b/src/test/compile-fail/class-cast-to-trait.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 trait noisy {
-  fn speak();
+  fn speak(&self);
 }
 
 struct cat {
@@ -21,7 +21,7 @@ struct cat {
 
 pub impl cat {
 
-  fn eat() -> bool {
+  fn eat(&self) -> bool {
     if self.how_hungry > 0 {
         error!("OM NOM NOM");
         self.how_hungry -= 2;
@@ -35,12 +35,12 @@ pub impl cat {
 }
 
 impl noisy for cat {
-  fn speak() { self.meow(); }
+  fn speak(&self) { self.meow(); }
 
 }
 
 priv impl cat {
-    fn meow() {
+    fn meow(&self) {
       error!("Meow");
       self.meows += 1;
       if self.meows % 5 == 0 {
@@ -49,7 +49,7 @@ priv impl cat {
     }
 }
 
-fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat {
+fn cat(&self, in_x : uint, in_y : int, in_name: ~str) -> cat {
     cat {
         meows: in_x,
         how_hungry: in_y,