Skip to content

Commit 89ed595

Browse files
committed
correct expected error msgs in various tests rs=breakage
1 parent 8a687dd commit 89ed595

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/test/compile-fail/access-mode-in-closures.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
enum sty = ~[int];
22

3-
fn unpack(unpack: &fn(v: &sty) -> ~[int]) {}
3+
fn unpack(_unpack: &fn(v: &sty) -> ~[int]) {}
44

55
fn main() {
6-
let foo = unpack(|s| {
6+
let _foo = unpack(|s| {
77
// Test that `s` is moved here.
88
match *s { sty(v) => v } //~ ERROR moving out of dereference of immutable & pointer
99
});

src/test/compile-fail/issue-2548.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ fn main() {
3232

3333
{
3434
let mut res = foo(x);
35-
35+
3636
let mut v = ~[mut];
37-
v = move ~[mut (move res)] + v; //~ ERROR instantiating a type parameter with an incompatible type (needs `copy`, got `durable`, missing `copy`)
37+
v = move ~[mut (move res)] + v; //~ ERROR instantiating a type parameter with an incompatible type (needs `copy`, got `&static`, missing `copy`)
3838
assert (v.len() == 2);
3939
}
4040

src/test/compile-fail/kindck-owned-trait-scoped.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn to_foo<T:Copy>(t: T) {
3232
fn to_foo_2<T:Copy>(t: T) -> foo {
3333
// Not OK---T may contain borrowed ptrs and it is going to escape
3434
// as part of the returned foo value
35-
{f:t} as foo //~ ERROR value may contain borrowed pointers; use `durable` bound
35+
{f:t} as foo //~ ERROR value may contain borrowed pointers; use `&static` bound
3636
}
3737

3838
fn to_foo_3<T:Copy &static>(t: T) -> foo {

src/test/compile-fail/kindck-owned-trait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
trait foo { fn foo(); }
1212

1313
fn to_foo<T: Copy foo>(t: T) -> foo {
14-
t as foo //~ ERROR value may contain borrowed pointers; use `durable` bound
14+
t as foo //~ ERROR value may contain borrowed pointers; use `&static` bound
1515
}
1616

1717
fn to_foo2<T: Copy foo &static>(t: T) -> foo {

src/test/compile-fail/kindck-owned.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ fn copy2<T: Copy &static>(t: T) -> fn@() -> T {
1818

1919
fn main() {
2020
let x = &3;
21-
copy2(&x); //~ ERROR missing `durable`
21+
copy2(&x); //~ ERROR missing `&static`
2222

2323
copy2(@3);
24-
copy2(@&x); //~ ERROR missing `durable`
24+
copy2(@&x); //~ ERROR missing `&static`
2525

2626
copy2(fn@() {});
2727
copy2(fn~() {}); //~ WARNING instantiating copy type parameter with a not implicitly copyable type
28-
copy2(fn&() {}); //~ ERROR missing `copy durable`
28+
copy2(fn&() {}); //~ ERROR missing `copy &static`
2929
}

0 commit comments

Comments
 (0)