From d0f56db9630f4b01a6a170aac220aa1b891d5016 Mon Sep 17 00:00:00 2001 From: Ben Blum Date: Mon, 24 Jun 2013 15:50:38 -0400 Subject: [PATCH] Change expected error message in kindchk compile-fail tests. --- src/test/compile-fail/kindck-nonsendable-1.rs | 6 +++--- src/test/compile-fail/kindck-owned-trait.rs | 4 +++- src/test/compile-fail/kindck-owned.rs | 3 +-- src/test/compile-fail/no-send-res-ports.rs | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/test/compile-fail/kindck-nonsendable-1.rs b/src/test/compile-fail/kindck-nonsendable-1.rs index 928abae2423..38983a9aca6 100644 --- a/src/test/compile-fail/kindck-nonsendable-1.rs +++ b/src/test/compile-fail/kindck-nonsendable-1.rs @@ -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` } diff --git a/src/test/compile-fail/kindck-owned-trait.rs b/src/test/compile-fail/kindck-owned-trait.rs index 857c71db72c..c2352e35a46 100644 --- a/src/test/compile-fail/kindck-owned-trait.rs +++ b/src/test/compile-fail/kindck-owned-trait.rs @@ -11,7 +11,9 @@ trait foo { fn foo(&self); } fn to_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: T) -> @foo { diff --git a/src/test/compile-fail/kindck-owned.rs b/src/test/compile-fail/kindck-owned.rs index ec84551f7b0..3f859b7dc84 100644 --- a/src/test/compile-fail/kindck-owned.rs +++ b/src/test/compile-fail/kindck-owned.rs @@ -9,8 +9,7 @@ // except according to those terms. fn copy1(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 } diff --git a/src/test/compile-fail/no-send-res-ports.rs b/src/test/compile-fail/no-send-res-ports.rs index 1f5b600157f..605e59d56c8 100644 --- a/src/test/compile-fail/no-send-res-ports.rs +++ b/src/test/compile-fail/no-send-res-ports.rs @@ -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); } }