Skip to content

Commit ac60d53

Browse files
committed
test: Some test fixes
1 parent 8fa66e8 commit ac60d53

8 files changed

+19
-19
lines changed

src/test/auxiliary/cci_impl_lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
#[link(name="cci_impl_lib", vers="0.0")];
1212

1313
trait uint_helpers {
14-
fn to(self, v: uint, f: &fn(uint));
14+
fn to(&self, v: uint, f: &fn(uint));
1515
}
1616

1717
impl uint_helpers for uint {
1818
#[inline]
19-
fn to(self, v: uint, f: &fn(uint)) {
20-
let mut i = self;
19+
fn to(&self, v: uint, f: &fn(uint)) {
20+
let mut i = *self;
2121
while i < v {
2222
f(i);
2323
i += 1u;

src/test/run-pass/assignability-trait.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ trait iterable<A> {
1818

1919
impl<A> iterable<A> for &self/[A] {
2020
fn iterate(&self, f: &fn(x: &A) -> bool) {
21-
for vec::each(self) |e| {
21+
for vec::each(*self) |e| {
2222
if !f(e) { break; }
2323
}
2424
}
2525
}
2626

2727
impl<A> iterable<A> for ~[A] {
2828
fn iterate(&self, f: &fn(x: &A) -> bool) {
29-
for vec::each(self) |e| {
29+
for vec::each(*self) |e| {
3030
if !f(e) { break; }
3131
}
3232
}

src/test/run-pass/auto-ref.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ struct Foo {
1313
}
1414

1515
trait Stuff {
16-
fn printme(self);
16+
fn printme(&self);
1717
}
1818

19-
impl Stuff for &self/Foo {
20-
fn printme(self) {
19+
impl Stuff for Foo {
20+
fn printme(&self) {
2121
io::println(fmt!("%d", self.x));
2222
}
2323
}

src/test/run-pass/autoderef-method-on-trait.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
// except according to those terms.
1010

1111
trait double {
12-
fn double(self) -> uint;
12+
fn double(@self) -> uint;
1313
}
1414

1515
impl double for uint {
16-
fn double(self) -> uint { self * 2u }
16+
fn double(@self) -> uint { *self * 2u }
1717
}
1818

1919
pub fn main() {

src/test/run-pass/autoderef-method-twice-but-not-thrice.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
// except according to those terms.
1010

1111
trait double {
12-
fn double(self) -> uint;
12+
fn double(@self) -> uint;
1313
}
1414

15-
impl double for @@uint {
16-
fn double(self) -> uint { **self * 2u }
15+
impl double for @uint {
16+
fn double(@self) -> uint { **self * 2u }
1717
}
1818

1919
pub fn main() {

src/test/run-pass/autoderef-method-twice.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
// except according to those terms.
1010

1111
trait double {
12-
fn double(self) -> uint;
12+
fn double(@self) -> uint;
1313
}
1414

1515
impl double for uint {
16-
fn double(self) -> uint { self * 2u }
16+
fn double(@self) -> uint { *self * 2u }
1717
}
1818

1919
pub fn main() {

src/test/run-pass/autoderef-method.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
// except according to those terms.
1010

1111
trait double {
12-
fn double(self) -> uint;
12+
fn double(@self) -> uint;
1313
}
1414

1515
impl double for uint {
16-
fn double(self) -> uint { self * 2u }
16+
fn double(@self) -> uint { *self * 2u }
1717
}
1818

1919
pub fn main() {

src/test/run-pass/boxed-trait-with-vstore.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
// except according to those terms.
1010

1111
trait Foo {
12-
fn foo(self);
12+
fn foo(@self);
1313
}
1414

1515
impl Foo for int {
16-
fn foo(self) {
16+
fn foo(@self) {
1717
io::println("Hello world!");
1818
}
1919
}

0 commit comments

Comments
 (0)