Files
rust/src/libcore/ops.rs

99 lines
1.4 KiB
Rust
Raw Normal View History

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