1
Fork 0

rustc: De-mode all overloaded operators

This commit is contained in:
Patrick Walton 2012-09-19 18:00:26 -07:00
parent 6b670c306b
commit 9117dcb968
100 changed files with 3969 additions and 249 deletions

View file

@ -10,11 +10,12 @@ 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(other: &mood) -> bool {
(self as uint) == ((*other) as uint)
}
pure fn ne(&&other: mood) -> bool { !self.eq(other) }
pure fn ne(other: &mood) -> bool { !self.eq(other) }
}
fn test_tag() {