about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-09-18 22:44:46 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-10-12 20:43:37 -0700
commit21453480903601700efb52c88a98e9428b03c4d3 (patch)
treeecba18274d84ddb4463212ff76928e89be4dac34 /src
parentf5f3a75b6501c987ffb34b3fb7510e0139c64bb8 (diff)
Make moves explicit in cfail tests
Diffstat (limited to 'src')
-rw-r--r--src/test/compile-fail/borrowck-loan-blocks-move.rs2
-rw-r--r--src/test/compile-fail/copy-into-closure.rs4
-rw-r--r--src/test/compile-fail/issue-1965.rs4
-rw-r--r--src/test/compile-fail/issue-2548.rs2
-rw-r--r--src/test/compile-fail/liveness-move-from-args.rs8
-rw-r--r--src/test/compile-fail/liveness-move-from-mode.rs2
-rw-r--r--src/test/compile-fail/liveness-unused.rs2
-rw-r--r--src/test/compile-fail/liveness-use-after-send.rs2
-rw-r--r--src/test/compile-fail/unique-unique-kind.rs2
-rw-r--r--src/test/compile-fail/unsendable-class.rs2
10 files changed, 15 insertions, 15 deletions
diff --git a/src/test/compile-fail/borrowck-loan-blocks-move.rs b/src/test/compile-fail/borrowck-loan-blocks-move.rs
index 5cecbf9284f..e48756bbbeb 100644
--- a/src/test/compile-fail/borrowck-loan-blocks-move.rs
+++ b/src/test/compile-fail/borrowck-loan-blocks-move.rs
@@ -4,7 +4,7 @@ fn take(-_v: ~int) {
 fn box_imm() {
     let v = ~3;
     let _w = &v; //~ NOTE loan of immutable local variable granted here
-    take(v); //~ ERROR moving out of immutable local variable prohibited due to outstanding loan
+    take(move v); //~ ERROR moving out of immutable local variable prohibited due to outstanding loan
 }
 
 fn main() {
diff --git a/src/test/compile-fail/copy-into-closure.rs b/src/test/compile-fail/copy-into-closure.rs
index 8ee2a4fd3ae..51e0934bfe0 100644
--- a/src/test/compile-fail/copy-into-closure.rs
+++ b/src/test/compile-fail/copy-into-closure.rs
@@ -4,7 +4,7 @@ fn closure1(+x: ~str) -> (~str, fn@() -> ~str) {
         //~^ WARNING implicitly copying a non-implicitly-copyable value
         //~^^ NOTE to copy values into a @fn closure, use a capture clause
     };
-    (x,f)
+    (move x,f)
 }
 
 fn closure2(+x: util::NonCopyable) -> (util::NonCopyable,
@@ -15,7 +15,7 @@ fn closure2(+x: util::NonCopyable) -> (util::NonCopyable,
         //~^^ NOTE non-copyable value cannot be copied into a @fn closure
         //~^^^ ERROR copying a noncopyable value
     };
-    (x,f)
+    (move x,f)
 }
 fn closure3(+x: util::NonCopyable) {
     do task::spawn {
diff --git a/src/test/compile-fail/issue-1965.rs b/src/test/compile-fail/issue-1965.rs
index 9742acba1e3..ee318d7b02c 100644
--- a/src/test/compile-fail/issue-1965.rs
+++ b/src/test/compile-fail/issue-1965.rs
@@ -2,6 +2,6 @@
 fn test(-x: uint) {}
 
 fn main() {
-    let i = 3u;
-    for uint::range(0u, 10u) |_x| {test(i)}
+    let i = 3;
+    for uint::range(0, 10) |_x| {test(move i)}
 }
diff --git a/src/test/compile-fail/issue-2548.rs b/src/test/compile-fail/issue-2548.rs
index 61cfabc40d2..0d491fc8834 100644
--- a/src/test/compile-fail/issue-2548.rs
+++ b/src/test/compile-fail/issue-2548.rs
@@ -21,7 +21,7 @@ fn main() {
         let mut res = foo(x);
         
         let mut v = ~[mut];
-        v <- ~[mut res] + v; //~ ERROR instantiating a type parameter with an incompatible type (needs `copy`, got `owned`, missing `copy`)
+        v <- ~[mut (move res)] + v; //~ ERROR instantiating a type parameter with an incompatible type (needs `copy`, got `owned`, missing `copy`)
         assert (v.len() == 2);
     }
 
diff --git a/src/test/compile-fail/liveness-move-from-args.rs b/src/test/compile-fail/liveness-move-from-args.rs
index 27e9d3b60dc..48f72dd0d3e 100644
--- a/src/test/compile-fail/liveness-move-from-args.rs
+++ b/src/test/compile-fail/liveness-move-from-args.rs
@@ -1,19 +1,19 @@
 fn take(-_x: int) { }
 
 fn from_by_value_arg(++x: int) {
-    take(x);  //~ ERROR illegal move from argument `x`, which is not copy or move mode
+    take(move x);  //~ ERROR illegal move from argument `x`, which is not copy or move mode
 }
 
 fn from_by_ref_arg(&&x: int) {
-    take(x);  //~ ERROR illegal move from argument `x`, which is not copy or move mode
+    take(move x);  //~ ERROR illegal move from argument `x`, which is not copy or move mode
 }
 
 fn from_copy_arg(+x: int) {
-    take(x);
+    take(move x);
 }
 
 fn from_move_arg(-x: int) {
-    take(x);
+    take(move x);
 }
 
 fn main() {
diff --git a/src/test/compile-fail/liveness-move-from-mode.rs b/src/test/compile-fail/liveness-move-from-mode.rs
index a837d337f98..959bda4e583 100644
--- a/src/test/compile-fail/liveness-move-from-mode.rs
+++ b/src/test/compile-fail/liveness-move-from-mode.rs
@@ -4,7 +4,7 @@ fn main() {
 
     let x: int = 25;
     loop {
-        take(x); //~ ERROR use of moved variable: `x`
+        take(move x); //~ ERROR use of moved variable: `x`
         //~^ NOTE move of variable occurred here
     }
 }
diff --git a/src/test/compile-fail/liveness-unused.rs b/src/test/compile-fail/liveness-unused.rs
index 8b2fef7cd35..473a133730a 100644
--- a/src/test/compile-fail/liveness-unused.rs
+++ b/src/test/compile-fail/liveness-unused.rs
@@ -54,5 +54,5 @@ struct r {
 }
 fn main() {
     let x = r { x: () };
-    fn@() { copy x; }; //~ ERROR copying a noncopyable value
+    fn@(move x) { copy x; }; //~ ERROR copying a noncopyable value
 }
diff --git a/src/test/compile-fail/liveness-use-after-send.rs b/src/test/compile-fail/liveness-use-after-send.rs
index 5447c88e567..13952dbe3c1 100644
--- a/src/test/compile-fail/liveness-use-after-send.rs
+++ b/src/test/compile-fail/liveness-use-after-send.rs
@@ -9,7 +9,7 @@ enum _chan<T> = int;
 // Tests that "log(debug, message);" is flagged as using
 // message after the send deinitializes it
 fn test00_start(ch: _chan<int>, message: int, _count: int) {
-    send(ch, message); //~ NOTE move of variable occurred here
+    send(ch, move message); //~ NOTE move of variable occurred here
     log(debug, message); //~ ERROR use of moved variable: `message`
 }
 
diff --git a/src/test/compile-fail/unique-unique-kind.rs b/src/test/compile-fail/unique-unique-kind.rs
index eea832c91a4..b31583724d2 100644
--- a/src/test/compile-fail/unique-unique-kind.rs
+++ b/src/test/compile-fail/unique-unique-kind.rs
@@ -3,5 +3,5 @@ fn f<T: Send>(_i: T) {
 
 fn main() {
     let i = ~@100;
-    f(i); //~ ERROR missing `send`
+    f(move i); //~ ERROR missing `send`
 }
diff --git a/src/test/compile-fail/unsendable-class.rs b/src/test/compile-fail/unsendable-class.rs
index a47a8b76e56..a84c1397319 100644
--- a/src/test/compile-fail/unsendable-class.rs
+++ b/src/test/compile-fail/unsendable-class.rs
@@ -17,5 +17,5 @@ fn main() {
   let cat = ~"kitty";
   let po = comm::Port();         //~ ERROR missing `send`
   let ch = comm::Chan(&po);       //~ ERROR missing `send`
-  comm::send(ch, foo(42, @cat)); //~ ERROR missing `send`
+  comm::send(ch, foo(42, @(move cat))); //~ ERROR missing `send`
 }