about summary refs log tree commit diff
path: root/src/test/run-pass/trait-inheritance-overloading.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/run-pass/trait-inheritance-overloading.rs')
-rw-r--r--src/test/run-pass/trait-inheritance-overloading.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/run-pass/trait-inheritance-overloading.rs b/src/test/run-pass/trait-inheritance-overloading.rs
index 6794e8130e5..56cdb5d3118 100644
--- a/src/test/run-pass/trait-inheritance-overloading.rs
+++ b/src/test/run-pass/trait-inheritance-overloading.rs
@@ -14,19 +14,19 @@ trait MyNum : Add<Self,Self> Sub<Self,Self> Mul<Self,Self> Eq { }
 
 struct MyInt { val: int }
 
-impl MyInt : Add<MyInt, MyInt> {
+impl Add<MyInt, MyInt> for MyInt {
     pure fn add(&self, other: &MyInt) -> MyInt { mi(self.val + other.val) }
 }
 
-impl MyInt : Sub<MyInt, MyInt> {
+impl Sub<MyInt, MyInt> for MyInt {
     pure fn sub(&self, other: &MyInt) -> MyInt { mi(self.val - other.val) }
 }
 
-impl MyInt : Mul<MyInt, MyInt> {
+impl Mul<MyInt, MyInt> for MyInt {
     pure fn mul(&self, other: &MyInt) -> MyInt { mi(self.val * other.val) }
 }
 
-impl MyInt : Eq {
+impl Eq for MyInt {
     pure fn eq(&self, other: &MyInt) -> bool { self.val == other.val }
     pure fn ne(&self, other: &MyInt) -> bool { !self.eq(other) }
 }