Skip to content

Commit e1685dd

Browse files
committed
test: More bustage fixes. rs=me
1 parent 6084032 commit e1685dd

9 files changed

+11
-11
lines changed

src/test/auxiliary/issue-2631-a.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ type header_map = HashMap<~str, @DVec<@~str>>;
1212

1313
// the unused ty param is necessary so this gets monomorphized
1414
fn request<T: Copy>(req: header_map) {
15-
let _x = *(copy *req.get(~"METHOD"))[0u];
15+
let _x = copy *(copy *req.get(~"METHOD"))[0u];
1616
}

src/test/run-pass/alt-implicit-copy-unique.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
fn main() {
22
let x = ~{mut a: ~10, b: ~20};
33
match x {
4-
~{a: ref a, b: ref b} => {
4+
~{a: ref mut a, b: ref mut b} => {
55
assert **a == 10; (*x).a = ~30; assert **a == 30;
66
}
77
}

src/test/run-pass/class-exports.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ mod kitty {
1212
}
1313

1414
impl cat {
15-
fn get_name() -> ~str { self.name }
15+
fn get_name() -> ~str { copy self.name }
1616
}
1717

1818
fn cat(in_name: ~str) -> cat {
@@ -26,4 +26,4 @@ mod kitty {
2626

2727
fn main() {
2828
assert(cat(~"Spreckles").get_name() == ~"Spreckles");
29-
}
29+
}

src/test/run-pass/class-separate-impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat {
4545
}
4646

4747
impl cat: ToStr {
48-
pure fn to_str() -> ~str { self.name }
48+
pure fn to_str() -> ~str { copy self.name }
4949
}
5050

5151
fn print_out<T: ToStr>(thing: T, expected: ~str) {

src/test/run-pass/getopts_ref.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fn main() {
99
match getopts(args, opts) {
1010
result::Ok(ref m) =>
1111
assert !opt_present(m, "b"),
12-
result::Err(ref f) => fail fail_str(*f)
12+
result::Err(ref f) => fail fail_str(copy *f)
1313
};
1414

1515
}

src/test/run-pass/last-use-is-capture.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ fn main() {
44
fn invoke(f: fn@()) { f(); }
55
let k = ~22;
66
let _u = {a: copy k};
7-
invoke(|| log(error, k) )
7+
invoke(|| log(error, copy k) )
88
}

src/test/run-pass/operator-overloading.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl Point : ops::Neg<Point> {
2525
}
2626

2727
impl Point : ops::Index<bool,int> {
28-
pure fn index(+x: bool) -> int {
28+
pure fn index(&self, +x: bool) -> int {
2929
if x { self.x } else { self.y }
3030
}
3131
}

src/test/run-pass/ret-break-cont-in-block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fn iter<T>(v: ~[T], it: fn(T) -> bool) {
1313

1414
fn find_pos<T:Eq>(n: T, h: ~[T]) -> Option<uint> {
1515
let mut i = 0u;
16-
for iter(h) |e| {
16+
for iter(copy h) |e| {
1717
if e == n { return Some(i); }
1818
i += 1u;
1919
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
fn main() {
22
let i = ~mut 1;
33
// Should be a copy
4-
let j = i;
4+
let j = copy i;
55
*i = 2;
66
*j = 3;
77
assert *i == 2;
88
assert *j == 3;
9-
}
9+
}

0 commit comments

Comments
 (0)