about summary refs log tree commit diff
path: root/src/test/run-pass/expr-if-struct.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/run-pass/expr-if-struct.rs')
-rw-r--r--src/test/run-pass/expr-if-struct.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/run-pass/expr-if-struct.rs b/src/test/run-pass/expr-if-struct.rs
index a1fb87f7d9e..52bf8cd3123 100644
--- a/src/test/run-pass/expr-if-struct.rs
+++ b/src/test/run-pass/expr-if-struct.rs
@@ -12,10 +12,10 @@ fn test_rec() {
 enum mood { happy, sad, }
 
 impl mood : cmp::Eq {
-    pure fn eq(other: &mood) -> bool {
-        (self as uint) == ((*other) as uint)
+    pure fn eq(&self, other: &mood) -> bool {
+        ((*self) as uint) == ((*other) as uint)
     }
-    pure fn ne(other: &mood) -> bool { !self.eq(other) }
+    pure fn ne(&self, other: &mood) -> bool { !(*self).eq(other) }
 }
 
 fn test_tag() {