De-export ops, cmp, num. Part of #3583.
This commit is contained in:
parent
0792ebe08a
commit
3eb7b5ca13
4 changed files with 17 additions and 22 deletions
|
|
@ -17,8 +17,6 @@ and `Eq` to overload the `==` and `!=` operators.
|
|||
pub use nounittest::*;
|
||||
pub use unittest::*;
|
||||
|
||||
export Ord, Eq;
|
||||
|
||||
/// Interfaces used for comparison.
|
||||
|
||||
// Awful hack to work around duplicate lang items in core test.
|
||||
|
|
|
|||
|
|
@ -206,11 +206,8 @@ mod uniq;
|
|||
// Ubiquitous-utility-type modules
|
||||
|
||||
#[cfg(notest)]
|
||||
#[legacy_exports]
|
||||
mod ops;
|
||||
#[legacy_exports]
|
||||
mod cmp;
|
||||
#[legacy_exports]
|
||||
mod num;
|
||||
#[legacy_exports]
|
||||
mod hash;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//! An interface for numeric types
|
||||
|
||||
trait Num {
|
||||
pub trait Num {
|
||||
// FIXME: Trait composition. (#2616)
|
||||
pure fn add(other: &self) -> self;
|
||||
pure fn sub(other: &self) -> self;
|
||||
|
|
|
|||
|
|
@ -1,82 +1,82 @@
|
|||
// Core operators and kinds.
|
||||
|
||||
#[lang="const"]
|
||||
trait Const {
|
||||
pub trait Const {
|
||||
// Empty.
|
||||
}
|
||||
|
||||
#[lang="copy"]
|
||||
trait Copy {
|
||||
pub trait Copy {
|
||||
// Empty.
|
||||
}
|
||||
|
||||
#[lang="send"]
|
||||
trait Send {
|
||||
pub trait Send {
|
||||
// Empty.
|
||||
}
|
||||
|
||||
#[lang="owned"]
|
||||
trait Owned {
|
||||
pub trait Owned {
|
||||
// Empty.
|
||||
}
|
||||
|
||||
#[lang="add"]
|
||||
trait Add<RHS,Result> {
|
||||
pub trait Add<RHS,Result> {
|
||||
pure fn add(rhs: &RHS) -> Result;
|
||||
}
|
||||
|
||||
#[lang="sub"]
|
||||
trait Sub<RHS,Result> {
|
||||
pub trait Sub<RHS,Result> {
|
||||
pure fn sub(rhs: &RHS) -> Result;
|
||||
}
|
||||
|
||||
#[lang="mul"]
|
||||
trait Mul<RHS,Result> {
|
||||
pub trait Mul<RHS,Result> {
|
||||
pure fn mul(rhs: &RHS) -> Result;
|
||||
}
|
||||
|
||||
#[lang="div"]
|
||||
trait Div<RHS,Result> {
|
||||
pub trait Div<RHS,Result> {
|
||||
pure fn div(rhs: &RHS) -> Result;
|
||||
}
|
||||
|
||||
#[lang="modulo"]
|
||||
trait Modulo<RHS,Result> {
|
||||
pub trait Modulo<RHS,Result> {
|
||||
pure fn modulo(rhs: &RHS) -> Result;
|
||||
}
|
||||
|
||||
#[lang="neg"]
|
||||
trait Neg<Result> {
|
||||
pub trait Neg<Result> {
|
||||
pure fn neg() -> Result;
|
||||
}
|
||||
|
||||
#[lang="bitand"]
|
||||
trait BitAnd<RHS,Result> {
|
||||
pub trait BitAnd<RHS,Result> {
|
||||
pure fn bitand(rhs: &RHS) -> Result;
|
||||
}
|
||||
|
||||
#[lang="bitor"]
|
||||
trait BitOr<RHS,Result> {
|
||||
pub trait BitOr<RHS,Result> {
|
||||
pure fn bitor(rhs: &RHS) -> Result;
|
||||
}
|
||||
|
||||
#[lang="bitxor"]
|
||||
trait BitXor<RHS,Result> {
|
||||
pub trait BitXor<RHS,Result> {
|
||||
pure fn bitxor(rhs: &RHS) -> Result;
|
||||
}
|
||||
|
||||
#[lang="shl"]
|
||||
trait Shl<RHS,Result> {
|
||||
pub trait Shl<RHS,Result> {
|
||||
pure fn shl(rhs: &RHS) -> Result;
|
||||
}
|
||||
|
||||
#[lang="shr"]
|
||||
trait Shr<RHS,Result> {
|
||||
pub trait Shr<RHS,Result> {
|
||||
pure fn shr(rhs: &RHS) -> Result;
|
||||
}
|
||||
|
||||
#[lang="index"]
|
||||
trait Index<Index,Result> {
|
||||
pub trait Index<Index,Result> {
|
||||
pure fn index(+index: Index) -> Result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue