Change expected error message in kindchk compile-fail tests.

This commit is contained in:
Ben Blum 2013-06-24 15:50:38 -04:00
parent ffc8c0ba21
commit d0f56db963
4 changed files with 8 additions and 7 deletions

View File

@ -12,7 +12,7 @@ fn foo(_x: @uint) {}
fn main() {
let x = @3u;
let _: ~fn() = || foo(x); //~ ERROR value has non-owned type `@uint`
let _: ~fn() = || foo(x); //~ ERROR value has non-owned type `@uint`
let _: ~fn() = || foo(x); //~ ERROR value has non-owned type `@uint`
let _: ~fn() = || foo(x); //~ ERROR does not fulfill `Owned`
let _: ~fn() = || foo(x); //~ ERROR does not fulfill `Owned`
let _: ~fn() = || foo(x); //~ ERROR does not fulfill `Owned`
}

View File

@ -11,7 +11,9 @@
trait foo { fn foo(&self); }
fn to_foo<T:Copy + foo>(t: T) -> @foo {
@t as @foo //~ ERROR value may contain borrowed pointers; add `'static` bound
@t as @foo
//~^ ERROR value may contain borrowed pointers; add `'static` bound
//~^^ ERROR cannot pack type
}
fn to_foo2<T:Copy + foo + 'static>(t: T) -> @foo {

View File

@ -9,8 +9,7 @@
// except according to those terms.
fn copy1<T:Copy>(t: T) -> @fn() -> T {
let result: @fn() -> T = || copy t;
//~^ ERROR value may contain borrowed pointers
let result: @fn() -> T = || copy t; //~ ERROR does not fulfill `'static`
result
}

View File

@ -32,7 +32,7 @@ fn main() {
let x = Cell::new(foo(Port(@())));
do task::spawn {
let y = x.take(); //~ ERROR value has non-owned type
let y = x.take(); //~ ERROR does not fulfill `Owned`
error!(y);
}
}