diff --git a/src/test/auxiliary/cci_impl_lib.rs b/src/test/auxiliary/cci_impl_lib.rs index b4191ff1d68e..aebe9382f64a 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 5fecbbe70e42..5d3ad4b3b2bb 100644 --- a/src/test/run-pass/assignability-trait.rs +++ b/src/test/run-pass/assignability-trait.rs @@ -18,7 +18,7 @@ trait iterable { impl iterable 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 iterable for &self/[A] { impl iterable 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 82fca3318b1c..f7c0f513a9df 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 c4e8e1685733..3fabb95f2a35 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 1a49ceb1cde8..a54e77476cf7 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 68691d9aa623..dde6ae9e5de4 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 9721eb9207eb..f6e04c79d454 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 e94525d1691a..1aac86238dc5 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!"); } }