2012-07-25 21:03:55 -05:00
|
|
|
// Core operators and kinds.
|
|
|
|
|
|
|
|
#[lang="const"]
|
2012-09-02 20:13:48 -05:00
|
|
|
trait Const {
|
2012-07-25 21:03:55 -05:00
|
|
|
// Empty.
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="copy"]
|
2012-09-02 20:13:48 -05:00
|
|
|
trait Copy {
|
2012-07-25 21:03:55 -05:00
|
|
|
// Empty.
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="send"]
|
2012-09-02 20:13:48 -05:00
|
|
|
trait Send {
|
2012-07-25 21:03:55 -05:00
|
|
|
// Empty.
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="owned"]
|
2012-09-02 20:13:48 -05:00
|
|
|
trait Owned {
|
2012-07-25 21:03:55 -05:00
|
|
|
// Empty.
|
|
|
|
}
|
|
|
|
|
2012-09-19 20:00:26 -05:00
|
|
|
#[lang="add"]
|
|
|
|
trait Add<RHS,Result> {
|
|
|
|
pure fn add(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="sub"]
|
|
|
|
trait Sub<RHS,Result> {
|
|
|
|
pure fn sub(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="mul"]
|
|
|
|
trait Mul<RHS,Result> {
|
|
|
|
pure fn mul(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="div"]
|
|
|
|
trait Div<RHS,Result> {
|
|
|
|
pure fn div(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="modulo"]
|
|
|
|
trait Modulo<RHS,Result> {
|
|
|
|
pure fn modulo(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
2012-07-25 21:03:55 -05:00
|
|
|
#[lang="neg"]
|
2012-09-02 20:13:48 -05:00
|
|
|
trait Neg<Result> {
|
2012-07-27 21:32:42 -05:00
|
|
|
pure fn neg() -> Result;
|
2012-07-25 21:03:55 -05:00
|
|
|
}
|
|
|
|
|
2012-09-19 20:00:26 -05:00
|
|
|
#[lang="bitand"]
|
|
|
|
trait BitAnd<RHS,Result> {
|
|
|
|
pure fn bitand(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="bitor"]
|
|
|
|
trait BitOr<RHS,Result> {
|
|
|
|
pure fn bitor(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="bitxor"]
|
|
|
|
trait BitXor<RHS,Result> {
|
|
|
|
pure fn bitxor(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="shl"]
|
|
|
|
trait Shl<RHS,Result> {
|
|
|
|
pure fn shl(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="shr"]
|
|
|
|
trait Shr<RHS,Result> {
|
|
|
|
pure fn shr(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
2012-07-25 21:03:55 -05:00
|
|
|
#[lang="index"]
|
2012-09-02 20:13:48 -05:00
|
|
|
trait Index<Index,Result> {
|
2012-07-25 21:03:55 -05:00
|
|
|
pure fn index(index: Index) -> Result;
|
|
|
|
}
|
|
|
|
|