Skip to content

Commit 9f7514b

Browse files
committed
test: Fix busted compile-fail tests. rs=bustage
1 parent f405e41 commit 9f7514b

8 files changed

+15
-18
lines changed

src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,8 @@ fn c() {
5555
*q + 3;
5656

5757

58-
// ...but not impure fns
59-
(*q).times(3); //~ ERROR illegal borrow unless pure
60-
//~^ NOTE impure due to access to impure function
58+
// ...and impure fns
59+
(*q).times(3);
6160
}
6261

6362
fn main() {

src/test/compile-fail/borrowck-loan-rcvr.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@ fn c() {
6262
// ...this is ok for pure fns
6363
(*q).purem();
6464

65-
// ...but not impure fns
66-
(*q).impurem(); //~ ERROR illegal borrow unless pure
67-
//~^ NOTE impure due to access to impure function
65+
// ...and impure fns
66+
(*q).impurem();
6867
}
6968

7069
fn main() {

src/test/compile-fail/liveness-move-in-loop.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ fn main() {
1919
loop {
2020
// tjc: Not sure why it prints the same error twice
2121
x = move y; //~ ERROR use of moved value
22-
//~^ NOTE move of value occurred here
22+
//~^ NOTE move of variable occurred here
2323
//~^^ ERROR use of moved value
24-
//~^^^ NOTE move of value occurred here
24+
//~^^^ NOTE move of variable occurred here
2525

2626
copy x;
2727
}

src/test/compile-fail/liveness-move-in-while.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ fn main() {
1717
// tjc: not sure why it prints the same error twice
1818
while true { while true { while true { x = move y; copy x; } } }
1919
//~^ ERROR use of moved value: `y`
20-
//~^^ NOTE move of value occurred here
20+
//~^^ NOTE move of variable occurred here
2121
//~^^^ ERROR use of moved value: `y`
22-
//~^^^^ NOTE move of value occurred here
22+
//~^^^^ NOTE move of variable occurred here
2323
}
2424
}

src/test/compile-fail/liveness-use-after-move.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
fn main() {
1212
let x = @5;
13-
let y = move x; //~ NOTE move of value occurred here
13+
let y = move x; //~ NOTE move of variable occurred here
1414
log(debug, *x); //~ ERROR use of moved value: `x`
1515
copy y;
1616
}

src/test/compile-fail/liveness-use-after-send.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ enum _chan<T> = int;
1919
// Tests that "log(debug, message);" is flagged as using
2020
// message after the send deinitializes it
2121
fn test00_start(ch: _chan<int>, message: int, _count: int) {
22-
send(ch, move message); //~ NOTE move of value occurred here
22+
send(ch, move message); //~ NOTE move of variable occurred here
2323
log(debug, message); //~ ERROR use of moved value: `message`
2424
}
2525

src/test/compile-fail/no-reuse-move-arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fn main() {
1616
let v = ~[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
1717
let arc_v = arc::ARC(v);
1818

19-
do task::spawn() |move arc_v| { //~ NOTE move of value occurred here
19+
do task::spawn() |move arc_v| { //~ NOTE move of variable occurred here
2020
let v = *arc::get(&arc_v);
2121
assert v[3] == 4;
2222
};

src/test/compile-fail/regions-escape-loop-via-vec.rs

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

1111
// The type of `y` ends up getting inferred to the type of the block.
12-
fn broken() -> int {
12+
fn broken() {
1313
let mut x = 3;
14-
let mut y = ~[&mut x];
14+
let mut _y = ~[&mut x];
1515
while x < 10 {
1616
let mut z = x;
17-
y += ~[&mut z]; //~ ERROR illegal borrow
17+
_y.push(&mut z); //~ ERROR illegal borrow
1818
x += 1;
1919
}
20-
vec::foldl(0, y, |v, p| v + **p )
2120
}
2221

23-
fn main() { }
22+
fn main() { }

0 commit comments

Comments
 (0)