libcore: Implement ord and eq language items

This commit is contained in:
Patrick Walton
2012-08-27 14:08:37 -07:00
parent 2bb056f4ab
commit 3a1582012e
2 changed files with 51 additions and 34 deletions

View File

@@ -4,10 +4,14 @@
/// Interfaces used for comparison.
#[cfg(notest)]
#[lang="ord"]
trait Ord {
pure fn lt(&&other: self) -> bool;
}
#[cfg(notest)]
#[lang="eq"]
trait Eq {
pure fn eq(&&other: self) -> bool;
}