diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-11-21 12:25:35 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-11-26 19:35:52 -0800 |
| commit | 7bc29c62d033c529ca8ec47fcd25842223a9bbad (patch) | |
| tree | e055f2ad72c2d081a64a1eeb4fd1463cab2003b3 /src/libcore | |
| parent | de0268b693ad1ff0f319d189b081c26576b7d535 (diff) | |
| download | rust-7bc29c62d033c529ca8ec47fcd25842223a9bbad.tar.gz rust-7bc29c62d033c529ca8ec47fcd25842223a9bbad.zip | |
libcore: Add explicit self to all overloaded operators but Add and Index. r=brson
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/ops.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index 96b96d0f27a..87c165266f8 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -35,52 +35,52 @@ pub trait Add<RHS,Result> { #[lang="sub"] pub trait Sub<RHS,Result> { - pure fn sub(rhs: &RHS) -> Result; + pure fn sub(&self, rhs: &RHS) -> Result; } #[lang="mul"] pub trait Mul<RHS,Result> { - pure fn mul(rhs: &RHS) -> Result; + pure fn mul(&self, rhs: &RHS) -> Result; } #[lang="div"] pub trait Div<RHS,Result> { - pure fn div(rhs: &RHS) -> Result; + pure fn div(&self, rhs: &RHS) -> Result; } #[lang="modulo"] pub trait Modulo<RHS,Result> { - pure fn modulo(rhs: &RHS) -> Result; + pure fn modulo(&self, rhs: &RHS) -> Result; } #[lang="neg"] pub trait Neg<Result> { - pure fn neg() -> Result; + pure fn neg(&self) -> Result; } #[lang="bitand"] pub trait BitAnd<RHS,Result> { - pure fn bitand(rhs: &RHS) -> Result; + pure fn bitand(&self, rhs: &RHS) -> Result; } #[lang="bitor"] pub trait BitOr<RHS,Result> { - pure fn bitor(rhs: &RHS) -> Result; + pure fn bitor(&self, rhs: &RHS) -> Result; } #[lang="bitxor"] pub trait BitXor<RHS,Result> { - pure fn bitxor(rhs: &RHS) -> Result; + pure fn bitxor(&self, rhs: &RHS) -> Result; } #[lang="shl"] pub trait Shl<RHS,Result> { - pure fn shl(rhs: &RHS) -> Result; + pure fn shl(&self, rhs: &RHS) -> Result; } #[lang="shr"] pub trait Shr<RHS,Result> { - pure fn shr(rhs: &RHS) -> Result; + pure fn shr(&self, rhs: &RHS) -> Result; } #[lang="index"] |
