diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-11-14 18:59:30 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-11-19 15:33:11 -0800 |
| commit | 318e534895f20e7991abbc644eec311816010ef1 (patch) | |
| tree | 764ce1ae3e9efbecd4fdc057663beb522b10bda9 /src/test/run-pass/class-impl-very-parameterized-trait.rs | |
| parent | 4101587a88d719659d2e30feaad8437c55af9150 (diff) | |
| download | rust-318e534895f20e7991abbc644eec311816010ef1.tar.gz rust-318e534895f20e7991abbc644eec311816010ef1.zip | |
rustc: Implement explicit self for Eq and Ord. r=graydon
Diffstat (limited to 'src/test/run-pass/class-impl-very-parameterized-trait.rs')
| -rw-r--r-- | src/test/run-pass/class-impl-very-parameterized-trait.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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 4cfcbf67cc9..c11e41eb57f 100644 --- a/src/test/run-pass/class-impl-very-parameterized-trait.rs +++ b/src/test/run-pass/class-impl-very-parameterized-trait.rs @@ -7,10 +7,10 @@ use std::map::*; enum cat_type { tuxedo, tabby, tortoiseshell } impl cat_type : cmp::Eq { - pure fn eq(other: &cat_type) -> bool { - (self as uint) == ((*other) as uint) + pure fn eq(&self, other: &cat_type) -> bool { + ((*self) as uint) == ((*other) as uint) } - pure fn ne(other: &cat_type) -> bool { !self.eq(other) } + pure fn ne(&self, other: &cat_type) -> bool { !(*self).eq(other) } } // Very silly -- this just returns the value of the name field |
