]> git.lizzy.rs Git - rust.git/commitdiff
Change expected error message in kindchk compile-fail tests.
authorBen Blum <bblum@andrew.cmu.edu>
Mon, 24 Jun 2013 19:50:38 +0000 (15:50 -0400)
committerBen Blum <bblum@andrew.cmu.edu>
Wed, 26 Jun 2013 22:14:43 +0000 (18:14 -0400)
src/test/compile-fail/kindck-nonsendable-1.rs
src/test/compile-fail/kindck-owned-trait.rs
src/test/compile-fail/kindck-owned.rs
src/test/compile-fail/no-send-res-ports.rs

index 928abae242383600bc937970289bba380192c72c..38983a9aca6a0c38ed4635f6fb27edd652bef50f 100644 (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`
 }
index 857c71db72ce0ac5dcb1715c5c6d388479d42760..c2352e35a46e92add4e236393c5ab616a5fd2e1e 100644 (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 {
index ec84551f7b0a58a858029e1fc9c8e11e8057357a..3f859b7dc84e65609f32a78ee4c63ef8f7e280ea 100644 (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
 }
 
index 1f5b600157f2dc136d243bcaaed22ea004e1f0a1..605e59d56c893151c8dbf54285d7e605f5820138 100644 (file)
@@ -32,7 +32,7 @@ fn foo(x: Port<()>) -> foo {
     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);
     }
 }