diff options
Diffstat (limited to 'src/test/run-pass/expr-if-struct.rs')
| -rw-r--r-- | src/test/run-pass/expr-if-struct.rs | 6 |
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() { |
