diff options
| -rw-r--r-- | src/test/auxiliary/cci_impl_lib.rs | 6 | ||||
| -rw-r--r-- | src/test/run-pass/assignability-trait.rs | 4 | ||||
| -rw-r--r-- | src/test/run-pass/auto-ref.rs | 6 | ||||
| -rw-r--r-- | src/test/run-pass/autoderef-method-on-trait.rs | 4 | ||||
| -rw-r--r-- | src/test/run-pass/autoderef-method-twice-but-not-thrice.rs | 6 | ||||
| -rw-r--r-- | src/test/run-pass/autoderef-method-twice.rs | 4 | ||||
| -rw-r--r-- | src/test/run-pass/autoderef-method.rs | 4 | ||||
| -rw-r--r-- | src/test/run-pass/boxed-trait-with-vstore.rs | 4 |
8 files changed, 19 insertions, 19 deletions
diff --git a/src/test/auxiliary/cci_impl_lib.rs b/src/test/auxiliary/cci_impl_lib.rs index b4191ff1d68..aebe9382f64 100644 --- a/src/test/auxiliary/cci_impl_lib.rs +++ b/src/test/auxiliary/cci_impl_lib.rs @@ -11,13 +11,13 @@ #[link(name="cci_impl_lib", vers="0.0")]; trait uint_helpers { - fn to(self, v: uint, f: &fn(uint)); + fn to(&self, v: uint, f: &fn(uint)); } impl uint_helpers for uint { #[inline] - fn to(self, v: uint, f: &fn(uint)) { - let mut i = self; + fn to(&self, v: uint, f: &fn(uint)) { + let mut i = *self; while i < v { f(i); i += 1u; diff --git a/src/test/run-pass/assignability-trait.rs b/src/test/run-pass/assignability-trait.rs index 5fecbbe70e4..5d3ad4b3b2b 100644 --- a/src/test/run-pass/assignability-trait.rs +++ b/src/test/run-pass/assignability-trait.rs @@ -18,7 +18,7 @@ trait iterable<A> { impl<A> iterable<A> for &self/[A] { fn iterate(&self, f: &fn(x: &A) -> bool) { - for vec::each(self) |e| { + for vec::each(*self) |e| { if !f(e) { break; } } } @@ -26,7 +26,7 @@ impl<A> iterable<A> for &self/[A] { impl<A> iterable<A> for ~[A] { fn iterate(&self, f: &fn(x: &A) -> bool) { - for vec::each(self) |e| { + for vec::each(*self) |e| { if !f(e) { break; } } } diff --git a/src/test/run-pass/auto-ref.rs b/src/test/run-pass/auto-ref.rs index 82fca3318b1..f7c0f513a9d 100644 --- a/src/test/run-pass/auto-ref.rs +++ b/src/test/run-pass/auto-ref.rs @@ -13,11 +13,11 @@ struct Foo { } trait Stuff { - fn printme(self); + fn printme(&self); } -impl Stuff for &self/Foo { - fn printme(self) { +impl Stuff for Foo { + fn printme(&self) { io::println(fmt!("%d", self.x)); } } diff --git a/src/test/run-pass/autoderef-method-on-trait.rs b/src/test/run-pass/autoderef-method-on-trait.rs index c4e8e168573..3fabb95f2a3 100644 --- a/src/test/run-pass/autoderef-method-on-trait.rs +++ b/src/test/run-pass/autoderef-method-on-trait.rs @@ -9,11 +9,11 @@ // except according to those terms. trait double { - fn double(self) -> uint; + fn double(@self) -> uint; } impl double for uint { - fn double(self) -> uint { self * 2u } + fn double(@self) -> uint { *self * 2u } } pub fn main() { diff --git a/src/test/run-pass/autoderef-method-twice-but-not-thrice.rs b/src/test/run-pass/autoderef-method-twice-but-not-thrice.rs index 1a49ceb1cde..a54e77476cf 100644 --- a/src/test/run-pass/autoderef-method-twice-but-not-thrice.rs +++ b/src/test/run-pass/autoderef-method-twice-but-not-thrice.rs @@ -9,11 +9,11 @@ // except according to those terms. trait double { - fn double(self) -> uint; + fn double(@self) -> uint; } -impl double for @@uint { - fn double(self) -> uint { **self * 2u } +impl double for @uint { + fn double(@self) -> uint { **self * 2u } } pub fn main() { diff --git a/src/test/run-pass/autoderef-method-twice.rs b/src/test/run-pass/autoderef-method-twice.rs index 68691d9aa62..dde6ae9e5de 100644 --- a/src/test/run-pass/autoderef-method-twice.rs +++ b/src/test/run-pass/autoderef-method-twice.rs @@ -9,11 +9,11 @@ // except according to those terms. trait double { - fn double(self) -> uint; + fn double(@self) -> uint; } impl double for uint { - fn double(self) -> uint { self * 2u } + fn double(@self) -> uint { *self * 2u } } pub fn main() { diff --git a/src/test/run-pass/autoderef-method.rs b/src/test/run-pass/autoderef-method.rs index 9721eb9207e..f6e04c79d45 100644 --- a/src/test/run-pass/autoderef-method.rs +++ b/src/test/run-pass/autoderef-method.rs @@ -9,11 +9,11 @@ // except according to those terms. trait double { - fn double(self) -> uint; + fn double(@self) -> uint; } impl double for uint { - fn double(self) -> uint { self * 2u } + fn double(@self) -> uint { *self * 2u } } pub fn main() { diff --git a/src/test/run-pass/boxed-trait-with-vstore.rs b/src/test/run-pass/boxed-trait-with-vstore.rs index e94525d1691..1aac86238dc 100644 --- a/src/test/run-pass/boxed-trait-with-vstore.rs +++ b/src/test/run-pass/boxed-trait-with-vstore.rs @@ -9,11 +9,11 @@ // except according to those terms. trait Foo { - fn foo(self); + fn foo(@self); } impl Foo for int { - fn foo(self) { + fn foo(@self) { io::println("Hello world!"); } } |
