rust/src/libcore/ops.rs

101 lines
1.4 KiB
Rust
Raw Normal View History

2012-07-25 19:03:55 -07:00
// Core operators and kinds.
#[allow(non_camel_case_types)];
#[cfg(notest)]
2012-07-25 19:03:55 -07:00
#[lang="const"]
trait const {
// Empty.
}
#[cfg(notest)]
2012-07-25 19:03:55 -07:00
#[lang="copy"]
trait copy {
// Empty.
}
#[cfg(notest)]
2012-07-25 19:03:55 -07:00
#[lang="send"]
trait send {
// Empty.
}
#[cfg(notest)]
2012-07-25 19:03:55 -07:00
#[lang="owned"]
trait owned {
// Empty.
}
#[cfg(notest)]
2012-07-25 19:03:55 -07:00
#[lang="add"]
trait add<RHS,Result> {
pure fn add(rhs: RHS) -> Result;
}
#[cfg(notest)]
2012-07-25 19:03:55 -07:00
#[lang="sub"]
trait sub<RHS,Result> {
pure fn sub(rhs: RHS) -> Result;
}
#[cfg(notest)]
2012-07-25 19:03:55 -07:00
#[lang="mul"]
trait mul<RHS,Result> {
pure fn mul(rhs: RHS) -> Result;
}
#[cfg(notest)]
2012-07-25 19:03:55 -07:00
#[lang="div"]
trait div<RHS,Result> {
pure fn div(rhs: RHS) -> Result;
}
#[cfg(notest)]
2012-07-25 19:03:55 -07:00
#[lang="modulo"]
trait modulo<RHS,Result> {
pure fn modulo(rhs: RHS) -> Result;
}
#[cfg(notest)]
2012-07-25 19:03:55 -07:00
#[lang="neg"]
trait neg<Result> {
pure fn neg() -> Result;
2012-07-25 19:03:55 -07:00
}
#[cfg(notest)]
#[lang="bitand"]
trait bitand<RHS,Result> {
pure fn bitand(rhs: RHS) -> Result;
2012-07-25 19:03:55 -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;
}