From 7bc29c62d033c529ca8ec47fcd25842223a9bbad Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Wed, 21 Nov 2012 12:25:35 -0800 Subject: libcore: Add explicit self to all overloaded operators but Add and Index. r=brson --- src/libcore/ops.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/libcore') 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 { #[lang="sub"] pub trait Sub { - pure fn sub(rhs: &RHS) -> Result; + pure fn sub(&self, rhs: &RHS) -> Result; } #[lang="mul"] pub trait Mul { - pure fn mul(rhs: &RHS) -> Result; + pure fn mul(&self, rhs: &RHS) -> Result; } #[lang="div"] pub trait Div { - pure fn div(rhs: &RHS) -> Result; + pure fn div(&self, rhs: &RHS) -> Result; } #[lang="modulo"] pub trait Modulo { - pure fn modulo(rhs: &RHS) -> Result; + pure fn modulo(&self, rhs: &RHS) -> Result; } #[lang="neg"] pub trait Neg { - pure fn neg() -> Result; + pure fn neg(&self) -> Result; } #[lang="bitand"] pub trait BitAnd { - pure fn bitand(rhs: &RHS) -> Result; + pure fn bitand(&self, rhs: &RHS) -> Result; } #[lang="bitor"] pub trait BitOr { - pure fn bitor(rhs: &RHS) -> Result; + pure fn bitor(&self, rhs: &RHS) -> Result; } #[lang="bitxor"] pub trait BitXor { - pure fn bitxor(rhs: &RHS) -> Result; + pure fn bitxor(&self, rhs: &RHS) -> Result; } #[lang="shl"] pub trait Shl { - pure fn shl(rhs: &RHS) -> Result; + pure fn shl(&self, rhs: &RHS) -> Result; } #[lang="shr"] pub trait Shr { - pure fn shr(rhs: &RHS) -> Result; + pure fn shr(&self, rhs: &RHS) -> Result; } #[lang="index"] -- cgit 1.4.1-3-g733a5