libcore: Add explicit self to all overloaded operators but Add and Index. r=brson
This commit is contained in:
parent
de0268b693
commit
7bc29c62d0
6 changed files with 25 additions and 25 deletions
|
@ -3,7 +3,7 @@ pub trait MyNum : Add<self,self>, Sub<self,self>, Mul<self,self> {
|
|||
|
||||
pub impl int : MyNum {
|
||||
pure fn add(other: &int) -> int { self + *other }
|
||||
pure fn sub(other: &int) -> int { self - *other }
|
||||
pure fn mul(other: &int) -> int { self * *other }
|
||||
pure fn sub(&self, other: &int) -> int { *self - *other }
|
||||
pure fn mul(&self, other: &int) -> int { *self * *other }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue