Skip to content

Commit

Permalink
correct expected error msgs in various tests rs=breakage
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Jan 10, 2013
1 parent 8a687dd commit 89ed595
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/test/compile-fail/access-mode-in-closures.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
enum sty = ~[int];

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

fn main() {
let foo = unpack(|s| {
let _foo = unpack(|s| {
// Test that `s` is moved here.
match *s { sty(v) => v } //~ ERROR moving out of dereference of immutable & pointer
});
Expand Down
4 changes: 2 additions & 2 deletions src/test/compile-fail/issue-2548.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ fn main() {

{
let mut res = foo(x);

let mut v = ~[mut];
v = move ~[mut (move res)] + v; //~ ERROR instantiating a type parameter with an incompatible type (needs `copy`, got `durable`, missing `copy`)
v = move ~[mut (move res)] + v; //~ ERROR instantiating a type parameter with an incompatible type (needs `copy`, got `&static`, missing `copy`)
assert (v.len() == 2);
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/kindck-owned-trait-scoped.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn to_foo<T:Copy>(t: T) {
fn to_foo_2<T:Copy>(t: T) -> foo {
// Not OK---T may contain borrowed ptrs and it is going to escape
// as part of the returned foo value
{f:t} as foo //~ ERROR value may contain borrowed pointers; use `durable` bound
{f:t} as foo //~ ERROR value may contain borrowed pointers; use `&static` bound
}

fn to_foo_3<T:Copy &static>(t: T) -> foo {
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/kindck-owned-trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
trait foo { fn foo(); }

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

fn to_foo2<T: Copy foo &static>(t: T) -> foo {
Expand Down
6 changes: 3 additions & 3 deletions src/test/compile-fail/kindck-owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ fn copy2<T: Copy &static>(t: T) -> fn@() -> T {

fn main() {
let x = &3;
copy2(&x); //~ ERROR missing `durable`
copy2(&x); //~ ERROR missing `&static`

copy2(@3);
copy2(@&x); //~ ERROR missing `durable`
copy2(@&x); //~ ERROR missing `&static`

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

0 comments on commit 89ed595

Please sign in to comment.