Change expected error message in kindchk compile-fail tests.
This commit is contained in:
parent
ffc8c0ba21
commit
d0f56db963
@ -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`
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user