From 89ed595e306a7f391b561ee8a5a1e7aca24bf534 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Thu, 10 Jan 2013 13:57:38 -0800 Subject: [PATCH] correct expected error msgs in various tests rs=breakage --- src/test/compile-fail/access-mode-in-closures.rs | 4 ++-- src/test/compile-fail/issue-2548.rs | 4 ++-- src/test/compile-fail/kindck-owned-trait-scoped.rs | 2 +- src/test/compile-fail/kindck-owned-trait.rs | 2 +- src/test/compile-fail/kindck-owned.rs | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/test/compile-fail/access-mode-in-closures.rs b/src/test/compile-fail/access-mode-in-closures.rs index 32ac756aaff25..6b785fbb5c175 100644 --- a/src/test/compile-fail/access-mode-in-closures.rs +++ b/src/test/compile-fail/access-mode-in-closures.rs @@ -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 }); diff --git a/src/test/compile-fail/issue-2548.rs b/src/test/compile-fail/issue-2548.rs index 16b6360b55987..2684289d70f73 100644 --- a/src/test/compile-fail/issue-2548.rs +++ b/src/test/compile-fail/issue-2548.rs @@ -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); } diff --git a/src/test/compile-fail/kindck-owned-trait-scoped.rs b/src/test/compile-fail/kindck-owned-trait-scoped.rs index b160ffe2ecdc1..6c6cdbbb2c773 100644 --- a/src/test/compile-fail/kindck-owned-trait-scoped.rs +++ b/src/test/compile-fail/kindck-owned-trait-scoped.rs @@ -32,7 +32,7 @@ fn to_foo(t: T) { fn to_foo_2(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: T) -> foo { diff --git a/src/test/compile-fail/kindck-owned-trait.rs b/src/test/compile-fail/kindck-owned-trait.rs index 63d8212f41d9f..683d66d0d72e9 100644 --- a/src/test/compile-fail/kindck-owned-trait.rs +++ b/src/test/compile-fail/kindck-owned-trait.rs @@ -11,7 +11,7 @@ trait foo { fn foo(); } fn to_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: T) -> foo { diff --git a/src/test/compile-fail/kindck-owned.rs b/src/test/compile-fail/kindck-owned.rs index 9cd7b36095fea..52031c900a289 100644 --- a/src/test/compile-fail/kindck-owned.rs +++ b/src/test/compile-fail/kindck-owned.rs @@ -18,12 +18,12 @@ fn copy2(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` }