2012-07-25 19:03:55 -07:00
|
|
|
// Core operators and kinds.
|
|
|
|
|
2012-07-27 19:32:42 -07:00
|
|
|
#[cfg(notest)]
|
2012-07-25 19:03:55 -07:00
|
|
|
#[lang="const"]
|
|
|
|
trait const {
|
|
|
|
// Empty.
|
|
|
|
}
|
|
|
|
|
2012-07-27 19:32:42 -07:00
|
|
|
#[cfg(notest)]
|
2012-07-25 19:03:55 -07:00
|
|
|
#[lang="copy"]
|
|
|
|
trait copy {
|
|
|
|
// Empty.
|
|
|
|
}
|
|
|
|
|
2012-07-27 19:32:42 -07:00
|
|
|
#[cfg(notest)]
|
2012-07-25 19:03:55 -07:00
|
|
|
#[lang="send"]
|
|
|
|
trait send {
|
|
|
|
// Empty.
|
|
|
|
}
|
|
|
|
|
2012-07-27 19:32:42 -07:00
|
|
|
#[cfg(notest)]
|
2012-07-25 19:03:55 -07:00
|
|
|
#[lang="owned"]
|
|
|
|
trait owned {
|
|
|
|
// Empty.
|
|
|
|
}
|
|
|
|
|
2012-07-27 19:32:42 -07:00
|
|
|
#[cfg(notest)]
|
2012-07-25 19:03:55 -07:00
|
|
|
#[lang="add"]
|
|
|
|
trait add<RHS,Result> {
|
|
|
|
pure fn add(rhs: RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
2012-07-27 19:32:42 -07:00
|
|
|
#[cfg(notest)]
|
2012-07-25 19:03:55 -07:00
|
|
|
#[lang="sub"]
|
|
|
|
trait sub<RHS,Result> {
|
|
|
|
pure fn sub(rhs: RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
2012-07-27 19:32:42 -07:00
|
|
|
#[cfg(notest)]
|
2012-07-25 19:03:55 -07:00
|
|
|
#[lang="mul"]
|
|
|
|
trait mul<RHS,Result> {
|
|
|
|
pure fn mul(rhs: RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
2012-07-27 19:32:42 -07:00
|
|
|
#[cfg(notest)]
|
2012-07-25 19:03:55 -07:00
|
|
|
#[lang="div"]
|
|
|
|
trait div<RHS,Result> {
|
|
|
|
pure fn div(rhs: RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
2012-07-27 19:32:42 -07:00
|
|
|
#[cfg(notest)]
|
2012-07-25 19:03:55 -07:00
|
|
|
#[lang="modulo"]
|
|
|
|
trait modulo<RHS,Result> {
|
|
|
|
pure fn modulo(rhs: RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
2012-07-27 19:32:42 -07:00
|
|
|
#[cfg(notest)]
|
2012-07-25 19:03:55 -07:00
|
|
|
#[lang="neg"]
|
2012-07-27 19:32:42 -07:00
|
|
|
trait neg<Result> {
|
|
|
|
pure fn neg() -> Result;
|
2012-07-25 19:03:55 -07:00
|
|
|
}
|
|
|
|
|
2012-07-27 19:32:42 -07:00
|
|
|
#[cfg(notest)]
|
|
|
|
#[lang="bitand"]
|
|
|
|
trait bitand<RHS,Result> {
|
|
|
|
pure fn bitand(rhs: RHS) -> Result;
|
2012-07-25 19:03:55 -07:00
|
|
|
}
|
|
|
|
|
2012-07-27 19:32:42 -07:00
|
|
|
#[cfg(notest)]
|
|
|
|
#[lang="bitor"]
|
|
|
|
trait bitor<RHS,Result> {
|
|
|
|
pure fn bitor(rhs: RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(notest)]
|
|
|
|
#[lang="bitxor"]
|
|
|
|
trait bitxor<RHS,Result> {
|
|
|
|
pure fn bitxor(rhs: RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(notest)]
|
|
|
|
#[lang="shl"]
|
|
|
|
trait shl<RHS,Result> {
|
|
|
|
pure fn shl(rhs: RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(notest)]
|
|
|
|
#[lang="shr"]
|
|
|
|
trait shr<RHS,Result> {
|
|
|
|
pure fn shr(rhs: RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(notest)]
|
2012-07-25 19:03:55 -07:00
|
|
|
#[lang="index"]
|
|
|
|
trait index<Index,Result> {
|
|
|
|
pure fn index(index: Index) -> Result;
|
|
|
|
}
|
|
|
|
|