summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2012-01-05 15:35:37 +0100
committerMarijn Haverbeke <marijnh@gmail.com>2012-01-05 15:50:02 +0100
commit60ae1590af034755b5cb1e1e71f2240a710299a2 (patch)
tree605d11f071a776c0ca33dcfea0a774379b0880bb /src/test
parent1f71a0f48d18d80ff3be6970d582c5a67f976329 (diff)
downloadrust-60ae1590af034755b5cb1e1e71f2240a710299a2.tar.gz
rust-60ae1590af034755b5cb1e1e71f2240a710299a2.zip
Switch to new param kind bound syntax
And remove support for the old syntax
Diffstat (limited to 'src/test')
-rw-r--r--src/test/bench/task-perf-word-count-generic.rs38
-rw-r--r--src/test/compile-fail/unique-unique-kind.rs2
-rw-r--r--src/test/compile-fail/use-after-send.rs2
-rw-r--r--src/test/run-fail/bug-811.rs4
-rw-r--r--src/test/run-fail/port-type.rs2
-rw-r--r--src/test/run-pass/auto-instantiate.rs2
-rw-r--r--src/test/run-pass/bind-generic.rs4
-rw-r--r--src/test/run-pass/box-unbox.rs4
-rw-r--r--src/test/run-pass/expr-alt-generic-box2.rs2
-rw-r--r--src/test/run-pass/expr-alt-generic-unique1.rs2
-rw-r--r--src/test/run-pass/expr-alt-generic-unique2.rs2
-rw-r--r--src/test/run-pass/expr-alt-generic.rs2
-rw-r--r--src/test/run-pass/expr-block-generic-box2.rs2
-rw-r--r--src/test/run-pass/expr-block-generic-unique1.rs2
-rw-r--r--src/test/run-pass/expr-block-generic-unique2.rs2
-rw-r--r--src/test/run-pass/expr-block-generic.rs2
-rw-r--r--src/test/run-pass/expr-fn.rs2
-rw-r--r--src/test/run-pass/expr-if-generic-box2.rs2
-rw-r--r--src/test/run-pass/expr-if-generic.rs2
-rw-r--r--src/test/run-pass/fixed-point-bind-unique.rs4
-rw-r--r--src/test/run-pass/fn-bare-spawn.rs2
-rw-r--r--src/test/run-pass/foreach-unique-drop.rs2
-rw-r--r--src/test/run-pass/generic-alias-box.rs2
-rw-r--r--src/test/run-pass/generic-alias-unique.rs2
-rw-r--r--src/test/run-pass/generic-bind-2.rs2
-rw-r--r--src/test/run-pass/generic-bind.rs2
-rw-r--r--src/test/run-pass/generic-box.rs2
-rw-r--r--src/test/run-pass/generic-derived-type.rs4
-rw-r--r--src/test/run-pass/generic-drop-glue.rs2
-rw-r--r--src/test/run-pass/generic-exterior-box.rs4
-rw-r--r--src/test/run-pass/generic-exterior-unique.rs4
-rw-r--r--src/test/run-pass/generic-fn-infer.rs2
-rw-r--r--src/test/run-pass/generic-fn-unique.rs2
-rw-r--r--src/test/run-pass/generic-fn.rs2
-rw-r--r--src/test/run-pass/generic-obj-with-derived-type.rs2
-rw-r--r--src/test/run-pass/generic-obj.rs2
-rw-r--r--src/test/run-pass/generic-tup.rs2
-rw-r--r--src/test/run-pass/generic-unique.rs2
-rw-r--r--src/test/run-pass/issue-333.rs4
-rw-r--r--src/test/run-pass/ivec-add.rs2
-rw-r--r--src/test/run-pass/newtype-polymorphic.rs4
-rw-r--r--src/test/run-pass/non-boolean-pure-fns.rs8
-rw-r--r--src/test/run-pass/obj-return-polytypes.rs2
-rw-r--r--src/test/run-pass/ret-none.rs2
-rw-r--r--src/test/run-pass/send-type-inference.rs4
-rw-r--r--src/test/run-pass/sendfn-generic-fn.rs4
-rw-r--r--src/test/run-pass/type-param-constraints.rs4
-rw-r--r--src/test/run-pass/unchecked-predicates.rs8
-rw-r--r--src/test/run-pass/unique-assign-generic.rs2
-rw-r--r--src/test/run-pass/unique-generic-assign.rs2
-rw-r--r--src/test/run-pass/unique-kinds.rs8
-rw-r--r--src/test/run-pass/vec-push.rs2
-rw-r--r--src/test/stdtest/deque.rs2
-rw-r--r--src/test/stdtest/task.rs2
54 files changed, 93 insertions, 93 deletions
diff --git a/src/test/bench/task-perf-word-count-generic.rs b/src/test/bench/task-perf-word-count-generic.rs
index cf8986aa0f7..e13603aec91 100644
--- a/src/test/bench/task-perf-word-count-generic.rs
+++ b/src/test/bench/task-perf-word-count-generic.rs
@@ -55,25 +55,25 @@ mod map_reduce {
     export reducer;
     export map_reduce;
 
-    type putter<send K, send V> = fn(K, V);
+    type putter<K: send, V: send> = fn(K, V);
 
     // FIXME: the first K1 parameter should probably be a -, but that
     // doesn't parse at the moment.
-    type mapper<send K1, send K2, send V> = fn(K1, putter<K2, V>);
+    type mapper<K1: send, K2: send, V: send> = fn(K1, putter<K2, V>);
 
-    type getter<send V> = fn() -> option<V>;
+    type getter<V: send> = fn() -> option<V>;
 
-    type reducer<send K, send V> = fn(K, getter<V>);
+    type reducer<K: send, V: send> = fn(K, getter<V>);
 
-    tag ctrl_proto<send K, send V> {
+    tag ctrl_proto<K: send, V: send> {
         find_reducer(K, chan<chan<reduce_proto<V>>>);
         mapper_done;
     }
 
-    tag reduce_proto<send V> { emit_val(V); done; ref; release; }
+    tag reduce_proto<V: send> { emit_val(V); done; ref; release; }
 
-    fn start_mappers<send K1, send K2,
-                     send V>(map: mapper<K1, K2, V>,
+    fn start_mappers<K1: send, K2: send,
+                     V: send>(map: mapper<K1, K2, V>,
                          ctrl: chan<ctrl_proto<K2, V>>, inputs: [K1]) ->
        [joinable_task] {
         let tasks = [];
@@ -84,15 +84,15 @@ mod map_reduce {
         ret tasks;
     }
 
-    fn map_task<send K1, send K2,
-                send V>(-map: mapper<K1, K2, V>,
+    fn map_task<K: send1, K: send2,
+                V: send>(-map: mapper<K1, K2, V>,
                           -ctrl: chan<ctrl_proto<K2, V>>,
                     -input: K1) {
         // log(error, "map_task " + input);
         let intermediates = treemap::init();
 
-        fn emit<send K2,
-                send V>(im: treemap::treemap<K2, chan<reduce_proto<V>>>,
+        fn emit<K: send2,
+                V: send>(im: treemap::treemap<K2, chan<reduce_proto<V>>>,
                     ctrl: chan<ctrl_proto<K2, V>>, key: K2, val: V) {
             let c;
             alt treemap::find(im, key) {
@@ -110,15 +110,15 @@ mod map_reduce {
 
         map(input, bind emit(intermediates, ctrl, _, _));
 
-        fn finish<send K, send V>(_k: K, v: chan<reduce_proto<V>>) {
+        fn finish<K: send, V: send>(_k: K, v: chan<reduce_proto<V>>) {
             send(v, release);
         }
         treemap::traverse(intermediates, finish);
         send(ctrl, mapper_done);
     }
 
-    fn reduce_task<send K,
-                   send V>(-reduce: reducer<K, V>, -key: K,
+    fn reduce_task<K: send,
+                   V: send>(-reduce: reducer<K, V>, -key: K,
                        -out: chan<chan<reduce_proto<V>>>) {
         let p = port();
 
@@ -127,7 +127,7 @@ mod map_reduce {
         let ref_count = 0;
         let is_done = false;
 
-        fn get<send V>(p: port<reduce_proto<V>>,
+        fn get<V: send>(p: port<reduce_proto<V>>,
                          &ref_count: int, &is_done: bool)
            -> option<V> {
             while !is_done || ref_count > 0 {
@@ -150,8 +150,8 @@ mod map_reduce {
         reduce(key, bind get(p, ref_count, is_done));
     }
 
-    fn map_reduce<send K1, send K2,
-                  send V>(map: mapper<K1, K2, V>, reduce: reducer<K2, V>,
+    fn map_reduce<K: send1, K: send2,
+                  V: send>(map: mapper<K1, K2, V>, reduce: reducer<K2, V>,
                       inputs: [K1]) {
         let ctrl = port();
 
@@ -195,7 +195,7 @@ mod map_reduce {
             }
         }
 
-        fn finish<send K, send V>(_k: K, v: chan<reduce_proto<V>>) {
+        fn finish<K: send, V: send>(_k: K, v: chan<reduce_proto<V>>) {
             send(v, done);
         }
         treemap::traverse(reducers, finish);
diff --git a/src/test/compile-fail/unique-unique-kind.rs b/src/test/compile-fail/unique-unique-kind.rs
index ad172f7ae83..8845e15721f 100644
--- a/src/test/compile-fail/unique-unique-kind.rs
+++ b/src/test/compile-fail/unique-unique-kind.rs
@@ -1,6 +1,6 @@
 // error-pattern: instantiating a sendable type parameter with a copyable type
 
-fn f<send T>(i: T) {
+fn f<T: send>(i: T) {
 }
 
 fn main() {
diff --git a/src/test/compile-fail/use-after-send.rs b/src/test/compile-fail/use-after-send.rs
index 7dc3f7b4a32..858cc62a944 100644
--- a/src/test/compile-fail/use-after-send.rs
+++ b/src/test/compile-fail/use-after-send.rs
@@ -1,5 +1,5 @@
 // error-pattern: Unsatisfied precondition constraint
-fn send<send T>(ch: _chan<T>, -data: T) {
+fn send<T: send>(ch: _chan<T>, -data: T) {
     log(debug, ch);
     log(debug, data);
     fail;
diff --git a/src/test/run-fail/bug-811.rs b/src/test/run-fail/bug-811.rs
index a257a903fd2..62206f93994 100644
--- a/src/test/run-fail/bug-811.rs
+++ b/src/test/run-fail/bug-811.rs
@@ -4,8 +4,8 @@ fn test00_start(ch: chan_t<int>, message: int) { send(ch, copy message); }
 type task_id = int;
 type port_id = int;
 
-type chan_t<send T> = {task: task_id, port: port_id};
+type chan_t<T: send> = {task: task_id, port: port_id};
 
-fn send<send T>(ch: chan_t<T>, -data: T) { fail; }
+fn send<T: send>(ch: chan_t<T>, -data: T) { fail; }
 
 fn main() { fail "quux"; }
diff --git a/src/test/run-fail/port-type.rs b/src/test/run-fail/port-type.rs
index a43c7ce0e69..3c7ebf8c18c 100644
--- a/src/test/run-fail/port-type.rs
+++ b/src/test/run-fail/port-type.rs
@@ -5,7 +5,7 @@ import comm::port;
 import comm::send;
 import comm::recv;
 
-fn echo<send T>(c: chan<T>, oc: chan<chan<T>>) {
+fn echo<T: send>(c: chan<T>, oc: chan<chan<T>>) {
     // Tests that the type argument in port gets
     // visited
     let p = port::<T>();
diff --git a/src/test/run-pass/auto-instantiate.rs b/src/test/run-pass/auto-instantiate.rs
index ed8c71aecba..0d5429e1980 100644
--- a/src/test/run-pass/auto-instantiate.rs
+++ b/src/test/run-pass/auto-instantiate.rs
@@ -2,7 +2,7 @@
 
 
 // -*- rust -*-
-fn f<copy T, copy U>(x: T, y: U) -> {a: T, b: U} { ret {a: x, b: y}; }
+fn f<T: copy, U: copy>(x: T, y: U) -> {a: T, b: U} { ret {a: x, b: y}; }
 
 fn main() {
     log(debug, f({x: 3, y: 4, z: 5}, 4).a.x);
diff --git a/src/test/run-pass/bind-generic.rs b/src/test/run-pass/bind-generic.rs
index e12caefe140..579b304f839 100644
--- a/src/test/run-pass/bind-generic.rs
+++ b/src/test/run-pass/bind-generic.rs
@@ -1,4 +1,4 @@
-fn wrapper3<copy T>(i: T, j: int) {
+fn wrapper3<T: copy>(i: T, j: int) {
     log(debug, i);
     log(debug, j);
     // This is a regression test that the spawn3 thunk to wrapper3
@@ -6,7 +6,7 @@ fn wrapper3<copy T>(i: T, j: int) {
     assert j == 123456789;
 }
 
-fn spawn3<copy T>(i: T, j: int) {
+fn spawn3<T: copy>(i: T, j: int) {
     let wrapped = bind wrapper3(i, j);
     wrapped();
 }
diff --git a/src/test/run-pass/box-unbox.rs b/src/test/run-pass/box-unbox.rs
index 61f932bb939..be9981ccdbe 100644
--- a/src/test/run-pass/box-unbox.rs
+++ b/src/test/run-pass/box-unbox.rs
@@ -1,8 +1,8 @@
 
 
-type box<copy T> = {c: @T};
+type box<T: copy> = {c: @T};
 
-fn unbox<copy T>(b: box<T>) -> T { ret *b.c; }
+fn unbox<T: copy>(b: box<T>) -> T { ret *b.c; }
 
 fn main() {
     let foo: int = 17;
diff --git a/src/test/run-pass/expr-alt-generic-box2.rs b/src/test/run-pass/expr-alt-generic-box2.rs
index bc19200e323..c2f933a3480 100644
--- a/src/test/run-pass/expr-alt-generic-box2.rs
+++ b/src/test/run-pass/expr-alt-generic-box2.rs
@@ -4,7 +4,7 @@
 // -*- rust -*-
 type compare<T> = fn@(T, T) -> bool;
 
-fn test_generic<copy T>(expected: T, eq: compare<T>) {
+fn test_generic<T: copy>(expected: T, eq: compare<T>) {
     let actual: T = alt true { true { expected } };
     assert (eq(expected, actual));
 }
diff --git a/src/test/run-pass/expr-alt-generic-unique1.rs b/src/test/run-pass/expr-alt-generic-unique1.rs
index 301d56389b1..2bbb0fea5f7 100644
--- a/src/test/run-pass/expr-alt-generic-unique1.rs
+++ b/src/test/run-pass/expr-alt-generic-unique1.rs
@@ -3,7 +3,7 @@
 // -*- rust -*-
 type compare<T> = fn@(~T, ~T) -> bool;
 
-fn test_generic<copy T>(expected: ~T, eq: compare<T>) {
+fn test_generic<T: copy>(expected: ~T, eq: compare<T>) {
     let actual: ~T = alt true { true { expected } };
     assert (eq(expected, actual));
 }
diff --git a/src/test/run-pass/expr-alt-generic-unique2.rs b/src/test/run-pass/expr-alt-generic-unique2.rs
index 5640dca0b4e..30581222bfa 100644
--- a/src/test/run-pass/expr-alt-generic-unique2.rs
+++ b/src/test/run-pass/expr-alt-generic-unique2.rs
@@ -4,7 +4,7 @@
 // -*- rust -*-
 type compare<T> = fn@(T, T) -> bool;
 
-fn test_generic<copy T>(expected: T, eq: compare<T>) {
+fn test_generic<T: copy>(expected: T, eq: compare<T>) {
     let actual: T = alt true { true { expected } };
     assert (eq(expected, actual));
 }
diff --git a/src/test/run-pass/expr-alt-generic.rs b/src/test/run-pass/expr-alt-generic.rs
index 5a2f7d8b71c..393cb1b7a4e 100644
--- a/src/test/run-pass/expr-alt-generic.rs
+++ b/src/test/run-pass/expr-alt-generic.rs
@@ -4,7 +4,7 @@
 // -*- rust -*-
 type compare<T> = fn@(T, T) -> bool;
 
-fn test_generic<copy T>(expected: T, eq: compare<T>) {
+fn test_generic<T: copy>(expected: T, eq: compare<T>) {
     let actual: T = alt true { true { expected } };
     assert (eq(expected, actual));
 }
diff --git a/src/test/run-pass/expr-block-generic-box2.rs b/src/test/run-pass/expr-block-generic-box2.rs
index ba98b8546a1..4ffc190716c 100644
--- a/src/test/run-pass/expr-block-generic-box2.rs
+++ b/src/test/run-pass/expr-block-generic-box2.rs
@@ -4,7 +4,7 @@
 // -*- rust -*-
 type compare<T> = fn@(T, T) -> bool;
 
-fn test_generic<copy T>(expected: T, eq: compare<T>) {
+fn test_generic<T: copy>(expected: T, eq: compare<T>) {
     let actual: T = { expected };
     assert (eq(expected, actual));
 }
diff --git a/src/test/run-pass/expr-block-generic-unique1.rs b/src/test/run-pass/expr-block-generic-unique1.rs
index 8942201fa9c..060fba26051 100644
--- a/src/test/run-pass/expr-block-generic-unique1.rs
+++ b/src/test/run-pass/expr-block-generic-unique1.rs
@@ -3,7 +3,7 @@
 // -*- rust -*-
 type compare<T> = fn@(~T, ~T) -> bool;
 
-fn test_generic<copy T>(expected: ~T, eq: compare<T>) {
+fn test_generic<T: copy>(expected: ~T, eq: compare<T>) {
     let actual: ~T = { expected };
     assert (eq(expected, actual));
 }
diff --git a/src/test/run-pass/expr-block-generic-unique2.rs b/src/test/run-pass/expr-block-generic-unique2.rs
index fba64608186..ce6489cdd12 100644
--- a/src/test/run-pass/expr-block-generic-unique2.rs
+++ b/src/test/run-pass/expr-block-generic-unique2.rs
@@ -4,7 +4,7 @@
 // -*- rust -*-
 type compare<T> = fn@(T, T) -> bool;
 
-fn test_generic<copy T>(expected: T, eq: compare<T>) {
+fn test_generic<T: copy>(expected: T, eq: compare<T>) {
     let actual: T = { expected };
     assert (eq(expected, actual));
 }
diff --git a/src/test/run-pass/expr-block-generic.rs b/src/test/run-pass/expr-block-generic.rs
index 4424d144e15..bf31ffd5808 100644
--- a/src/test/run-pass/expr-block-generic.rs
+++ b/src/test/run-pass/expr-block-generic.rs
@@ -6,7 +6,7 @@
 // Tests for standalone blocks as expressions with dynamic type sizes
 type compare<T> = fn@(T, T) -> bool;
 
-fn test_generic<copy T>(expected: T, eq: compare<T>) {
+fn test_generic<T: copy>(expected: T, eq: compare<T>) {
     let actual: T = { expected };
     assert (eq(expected, actual));
 }
diff --git a/src/test/run-pass/expr-fn.rs b/src/test/run-pass/expr-fn.rs
index 5cd3f2a178b..a3bd2449bb2 100644
--- a/src/test/run-pass/expr-fn.rs
+++ b/src/test/run-pass/expr-fn.rs
@@ -9,7 +9,7 @@ fn test_vec() {
 }
 
 fn test_generic() {
-    fn f<copy T>(t: T) -> T { t }
+    fn f<T: copy>(t: T) -> T { t }
     assert (f(10) == 10);
 }
 
diff --git a/src/test/run-pass/expr-if-generic-box2.rs b/src/test/run-pass/expr-if-generic-box2.rs
index da00556eb4e..01daf198dfe 100644
--- a/src/test/run-pass/expr-if-generic-box2.rs
+++ b/src/test/run-pass/expr-if-generic-box2.rs
@@ -4,7 +4,7 @@
 // -*- rust -*-
 type compare<T> = fn@(T, T) -> bool;
 
-fn test_generic<copy T>(expected: T, not_expected: T, eq: compare<T>) {
+fn test_generic<T: copy>(expected: T, not_expected: T, eq: compare<T>) {
     let actual: T = if true { expected } else { not_expected };
     assert (eq(expected, actual));
 }
diff --git a/src/test/run-pass/expr-if-generic.rs b/src/test/run-pass/expr-if-generic.rs
index f98a8742cc2..9c565f35f67 100644
--- a/src/test/run-pass/expr-if-generic.rs
+++ b/src/test/run-pass/expr-if-generic.rs
@@ -6,7 +6,7 @@
 // Tests for if as expressions with dynamic type sizes
 type compare<T> = fn@(T, T) -> bool;
 
-fn test_generic<copy T>(expected: T, not_expected: T, eq: compare<T>) {
+fn test_generic<T: copy>(expected: T, not_expected: T, eq: compare<T>) {
     let actual: T = if true { expected } else { not_expected };
     assert (eq(expected, actual));
 }
diff --git a/src/test/run-pass/fixed-point-bind-unique.rs b/src/test/run-pass/fixed-point-bind-unique.rs
index bbfc3f53f26..dac5ffd0416 100644
--- a/src/test/run-pass/fixed-point-bind-unique.rs
+++ b/src/test/run-pass/fixed-point-bind-unique.rs
@@ -1,8 +1,8 @@
-fn fix_help<A, send B>(f: fn(fn@(A) -> B, A) -> B, x: A) -> B {
+fn fix_help<A, B: send>(f: fn(fn@(A) -> B, A) -> B, x: A) -> B {
     ret f(bind fix_help(f, _), x);
 }
 
-fn fix<A, send B>(f: fn(fn@(A) -> B, A) -> B) -> fn@(A) -> B {
+fn fix<A, B: send>(f: fn(fn@(A) -> B, A) -> B) -> fn@(A) -> B {
     ret bind fix_help(f, _);
 }
 
diff --git a/src/test/run-pass/fn-bare-spawn.rs b/src/test/run-pass/fn-bare-spawn.rs
index 59a57b8597c..ab4f40236be 100644
--- a/src/test/run-pass/fn-bare-spawn.rs
+++ b/src/test/run-pass/fn-bare-spawn.rs
@@ -1,6 +1,6 @@
 // This is what the signature to spawn should look like with bare functions
 
-fn spawn<send T>(val: T, f: fn(T)) {
+fn spawn<T: send>(val: T, f: fn(T)) {
     f(val);
 }
 
diff --git a/src/test/run-pass/foreach-unique-drop.rs b/src/test/run-pass/foreach-unique-drop.rs
index 5b696a0efe9..1c8f900b2e0 100644
--- a/src/test/run-pass/foreach-unique-drop.rs
+++ b/src/test/run-pass/foreach-unique-drop.rs
@@ -1,5 +1,5 @@
 
-obj ob<copy K>(k: K) {
+obj ob<K: copy>(k: K) {
     fn foo(it: block(~{a: K})) { it(~{a: k}); }
 }
 
diff --git a/src/test/run-pass/generic-alias-box.rs b/src/test/run-pass/generic-alias-box.rs
index f44ef370e2c..b9bc823a8b9 100644
--- a/src/test/run-pass/generic-alias-box.rs
+++ b/src/test/run-pass/generic-alias-box.rs
@@ -1,6 +1,6 @@
 
 
-fn id<copy T>(t: T) -> T { ret t; }
+fn id<T: copy>(t: T) -> T { ret t; }
 
 fn main() {
     let expected = @100;
diff --git a/src/test/run-pass/generic-alias-unique.rs b/src/test/run-pass/generic-alias-unique.rs
index 4746a588a56..0af9855de0d 100644
--- a/src/test/run-pass/generic-alias-unique.rs
+++ b/src/test/run-pass/generic-alias-unique.rs
@@ -1,6 +1,6 @@
 
 
-fn id<send T>(t: T) -> T { ret t; }
+fn id<T: send>(t: T) -> T { ret t; }
 
 fn main() {
     let expected = ~100;
diff --git a/src/test/run-pass/generic-bind-2.rs b/src/test/run-pass/generic-bind-2.rs
index c633cb2d08a..eeb9cf25f8f 100644
--- a/src/test/run-pass/generic-bind-2.rs
+++ b/src/test/run-pass/generic-bind-2.rs
@@ -1,6 +1,6 @@
 
 
-fn id<copy T>(t: T) -> T { ret t; }
+fn id<T: copy>(t: T) -> T { ret t; }
 
 fn main() {
     let t = {a: 1, b: 2, c: 3, d: 4, e: 5, f: 6, g: 7};
diff --git a/src/test/run-pass/generic-bind.rs b/src/test/run-pass/generic-bind.rs
index 8464bfb0241..d0d3ea98a47 100644
--- a/src/test/run-pass/generic-bind.rs
+++ b/src/test/run-pass/generic-bind.rs
@@ -1,6 +1,6 @@
 
 
-fn id<copy T>(t: T) -> T { ret t; }
+fn id<T: copy>(t: T) -> T { ret t; }
 
 fn main() {
     let t = {_0: 1, _1: 2, _2: 3, _3: 4, _4: 5, _5: 6, _6: 7};
diff --git a/src/test/run-pass/generic-box.rs b/src/test/run-pass/generic-box.rs
index 87465ae6a93..14fb924492a 100644
--- a/src/test/run-pass/generic-box.rs
+++ b/src/test/run-pass/generic-box.rs
@@ -1,6 +1,6 @@
 
 
-fn box<copy T>(x: {x: T, y: T, z: T}) -> @{x: T, y: T, z: T} { ret @x; }
+fn box<T: copy>(x: {x: T, y: T, z: T}) -> @{x: T, y: T, z: T} { ret @x; }
 
 fn main() {
     let x: @{x: int, y: int, z: int} = box::<int>({x: 1, y: 2, z: 3});
diff --git a/src/test/run-pass/generic-derived-type.rs b/src/test/run-pass/generic-derived-type.rs
index 032a5c3f9d6..39f4c0d1472 100644
--- a/src/test/run-pass/generic-derived-type.rs
+++ b/src/test/run-pass/generic-derived-type.rs
@@ -1,8 +1,8 @@
 
 
-fn g<copy X>(x: X) -> X { ret x; }
+fn g<X: copy>(x: X) -> X { ret x; }
 
-fn f<copy T>(t: T) -> {a: T, b: T} {
+fn f<T: copy>(t: T) -> {a: T, b: T} {
     type pair = {a: T, b: T};
 
     let x: pair = {a: t, b: t};
diff --git a/src/test/run-pass/generic-drop-glue.rs b/src/test/run-pass/generic-drop-glue.rs
index ced0ecfbe9e..15583f9904b 100644
--- a/src/test/run-pass/generic-drop-glue.rs
+++ b/src/test/run-pass/generic-drop-glue.rs
@@ -1,5 +1,5 @@
 
 
-fn f<copy T>(t: T) { let t1: T = t; }
+fn f<T: copy>(t: T) { let t1: T = t; }
 
 fn main() { let x = {x: @10, y: @12}; f(x); }
diff --git a/src/test/run-pass/generic-exterior-box.rs b/src/test/run-pass/generic-exterior-box.rs
index 41315e15643..8c042a9e76d 100644
--- a/src/test/run-pass/generic-exterior-box.rs
+++ b/src/test/run-pass/generic-exterior-box.rs
@@ -1,8 +1,8 @@
 
 
-type recbox<copy T> = {x: @T};
+type recbox<T: copy> = {x: @T};
 
-fn reclift<copy T>(t: T) -> recbox<T> { ret {x: @t}; }
+fn reclift<T: copy>(t: T) -> recbox<T> { ret {x: @t}; }
 
 fn main() {
     let foo: int = 17;
diff --git a/src/test/run-pass/generic-exterior-unique.rs b/src/test/run-pass/generic-exterior-unique.rs
index 1a97c134748..6f985120d42 100644
--- a/src/test/run-pass/generic-exterior-unique.rs
+++ b/src/test/run-pass/generic-exterior-unique.rs
@@ -1,6 +1,6 @@
-type recbox<copy T> = {x: ~T};
+type recbox<T: copy> = {x: ~T};
 
-fn reclift<copy T>(t: T) -> recbox<T> { ret {x: ~t}; }
+fn reclift<T: copy>(t: T) -> recbox<T> { ret {x: ~t}; }
 
 fn main() {
     let foo: int = 17;
diff --git a/src/test/run-pass/generic-fn-infer.rs b/src/test/run-pass/generic-fn-infer.rs
index 57d4052e5a0..31f0008fc0b 100644
--- a/src/test/run-pass/generic-fn-infer.rs
+++ b/src/test/run-pass/generic-fn-infer.rs
@@ -4,6 +4,6 @@
 // -*- rust -*-
 
 // Issue #45: infer type parameters in function applications
-fn id<copy T>(x: T) -> T { ret x; }
+fn id<T: copy>(x: T) -> T { ret x; }
 
 fn main() { let x: int = 42; let y: int = id(x); assert (x == y); }
diff --git a/src/test/run-pass/generic-fn-unique.rs b/src/test/run-pass/generic-fn-unique.rs
index 7333350e3b2..749341c1a19 100644
--- a/src/test/run-pass/generic-fn-unique.rs
+++ b/src/test/run-pass/generic-fn-unique.rs
@@ -1,4 +1,4 @@
 
-fn f<copy T>(x: ~T) -> ~T { ret x; }
+fn f<T: copy>(x: ~T) -> ~T { ret x; }
 
 fn main() { let x = f(~3); log(debug, *x); }
diff --git a/src/test/run-pass/generic-fn.rs b/src/test/run-pass/generic-fn.rs
index ac2d6f5aad3..6f854efa857 100644
--- a/src/test/run-pass/generic-fn.rs
+++ b/src/test/run-pass/generic-fn.rs
@@ -2,7 +2,7 @@
 
 
 // -*- rust -*-
-fn id<copy T>(x: T) -> T { ret x; }
+fn id<T: copy>(x: T) -> T { ret x; }
 
 type triple = {x: int, y: int, z: int};
 
diff --git a/src/test/run-pass/generic-obj-with-derived-type.rs b/src/test/run-pass/generic-obj-with-derived-type.rs
index 2186b12022d..2c4e1804af5 100644
--- a/src/test/run-pass/generic-obj-with-derived-type.rs
+++ b/src/test/run-pass/generic-obj-with-derived-type.rs
@@ -1,6 +1,6 @@
 
 
-obj handle<copy T>(data: T) {
+obj handle<T: copy>(data: T) {
     fn get() -> T { ret data; }
 }
 
diff --git a/src/test/run-pass/generic-obj.rs b/src/test/run-pass/generic-obj.rs
index ab693787182..5eedeecb5bc 100644
--- a/src/test/run-pass/generic-obj.rs
+++ b/src/test/run-pass/generic-obj.rs
@@ -1,6 +1,6 @@
 
 
-obj buf<copy T>(data: {_0: T, _1: T, _2: T}) {
+obj buf<T: copy>(data: {_0: T, _1: T, _2: T}) {
     fn get(i: int) -> T {
         if i == 0 {
             ret data._0;
diff --git a/src/test/run-pass/generic-tup.rs b/src/test/run-pass/generic-tup.rs
index 2b5f81d526d..58a33b80946 100644
--- a/src/test/run-pass/generic-tup.rs
+++ b/src/test/run-pass/generic-tup.rs
@@ -1,4 +1,4 @@
-fn get_third<copy T>(t: (T, T, T)) -> T { let (_, _, x) = t; ret x; }
+fn get_third<T: copy>(t: (T, T, T)) -> T { let (_, _, x) = t; ret x; }
 
 fn main() {
     log(debug, get_third((1, 2, 3)));
diff --git a/src/test/run-pass/generic-unique.rs b/src/test/run-pass/generic-unique.rs
index 3b6b19ce450..686bd36888e 100644
--- a/src/test/run-pass/generic-unique.rs
+++ b/src/test/run-pass/generic-unique.rs
@@ -1,5 +1,5 @@
 
-fn box<copy T>(x: {x: T, y: T, z: T}) -> ~{x: T, y: T, z: T} { ret ~x; }
+fn box<T: copy>(x: {x: T, y: T, z: T}) -> ~{x: T, y: T, z: T} { ret ~x; }
 
 fn main() {
     let x: ~{x: int, y: int, z: int} = box::<int>({x: 1, y: 2, z: 3});
diff --git a/src/test/run-pass/issue-333.rs b/src/test/run-pass/issue-333.rs
index 793df760b4b..be253b9afdd 100644
--- a/src/test/run-pass/issue-333.rs
+++ b/src/test/run-pass/issue-333.rs
@@ -1,5 +1,5 @@
-fn quux<copy T>(x: T) -> T { let f = bind id::<T>(_); ret f(x); }
+fn quux<T: copy>(x: T) -> T { let f = bind id::<T>(_); ret f(x); }
 
-fn id<copy T>(x: T) -> T { ret x; }
+fn id<T: copy>(x: T) -> T { ret x; }
 
 fn main() { assert (quux(10) == 10); }
diff --git a/src/test/run-pass/ivec-add.rs b/src/test/run-pass/ivec-add.rs
index 9e45b028386..e79ca8bae38 100644
--- a/src/test/run-pass/ivec-add.rs
+++ b/src/test/run-pass/ivec-add.rs
@@ -1,4 +1,4 @@
-fn double<copy T>(a: T) -> [T] { ret [a] + [a]; }
+fn double<T: copy>(a: T) -> [T] { ret [a] + [a]; }
 
 fn double_int(a: int) -> [int] { ret [a] + [a]; }
 
diff --git a/src/test/run-pass/newtype-polymorphic.rs b/src/test/run-pass/newtype-polymorphic.rs
index 5bb2171dfd2..f25665ca86c 100644
--- a/src/test/run-pass/newtype-polymorphic.rs
+++ b/src/test/run-pass/newtype-polymorphic.rs
@@ -1,8 +1,8 @@
 tag myvec<X> = [X];
 
-fn myvec_deref<copy X>(mv: myvec<X>) -> [X] { ret *mv; }
+fn myvec_deref<X: copy>(mv: myvec<X>) -> [X] { ret *mv; }
 
-fn myvec_elt<copy X>(mv: myvec<X>) -> X { ret mv[0]; }
+fn myvec_elt<X: copy>(mv: myvec<X>) -> X { ret mv[0]; }
 
 fn main() {
     let mv = myvec([1, 2, 3]);
diff --git a/src/test/run-pass/non-boolean-pure-fns.rs b/src/test/run-pass/non-boolean-pure-fns.rs
index 27f3b530154..d74fb81a3b9 100644
--- a/src/test/run-pass/non-boolean-pure-fns.rs
+++ b/src/test/run-pass/non-boolean-pure-fns.rs
@@ -2,19 +2,19 @@ use std;
 
 import std::list::*;
 
-pure fn pure_length_go<copy T>(ls: list<T>, acc: uint) -> uint {
+pure fn pure_length_go<T: copy>(ls: list<T>, acc: uint) -> uint {
     alt ls { nil. { acc } cons(_, tl) { pure_length_go(*tl, acc + 1u) } }
 }
 
-pure fn pure_length<copy T>(ls: list<T>) -> uint { pure_length_go(ls, 0u) }
+pure fn pure_length<T: copy>(ls: list<T>) -> uint { pure_length_go(ls, 0u) }
 
-pure fn nonempty_list<copy T>(ls: list<T>) -> bool { pure_length(ls) > 0u }
+pure fn nonempty_list<T: copy>(ls: list<T>) -> bool { pure_length(ls) > 0u }
 
 // Of course, the compiler can't take advantage of the
 // knowledge that ls is a cons node. Future work.
 // Also, this is pretty contrived since nonempty_list
 // could be a "tag refinement", if we implement those.
-fn safe_head<copy T>(ls: list<T>) : nonempty_list(ls) -> T {
+fn safe_head<T: copy>(ls: list<T>) : nonempty_list(ls) -> T {
     check is_not_empty(ls);
     ret head(ls);
 }
diff --git a/src/test/run-pass/obj-return-polytypes.rs b/src/test/run-pass/obj-return-polytypes.rs
index ebfcf37e79d..4c1f8d54ced 100644
--- a/src/test/run-pass/obj-return-polytypes.rs
+++ b/src/test/run-pass/obj-return-polytypes.rs
@@ -6,7 +6,7 @@ tag clam<T> { signed(int); unsigned(uint); }
 
 fn getclam<T>() -> clam<T> { ret signed::<T>(42); }
 
-obj impatience<copy T>() {
+obj impatience<T: copy>() {
     fn moreclam() -> clam<T> { be getclam::<T>(); }
 }
 
diff --git a/src/test/run-pass/ret-none.rs b/src/test/run-pass/ret-none.rs
index fe91c15c72d..7481bfe9100 100644
--- a/src/test/run-pass/ret-none.rs
+++ b/src/test/run-pass/ret-none.rs
@@ -2,6 +2,6 @@
 
 tag option<T> { none; some(T); }
 
-fn f<copy T>() -> option<T> { ret none; }
+fn f<T: copy>() -> option<T> { ret none; }
 
 fn main() { f::<int>(); }
diff --git a/src/test/run-pass/send-type-inference.rs b/src/test/run-pass/send-type-inference.rs
index 1c88d0182f6..432985bcb7f 100644
--- a/src/test/run-pass/send-type-inference.rs
+++ b/src/test/run-pass/send-type-inference.rs
@@ -4,9 +4,9 @@ import comm::send;
 import comm::port;
 
 // tests that ctrl's type gets inferred properly
-type command<send K, send V> = {key: K, val: V};
+type command<K: send, V: send> = {key: K, val: V};
 
-fn cache_server<send K, send V>(c: chan<chan<command<K, V>>>) {
+fn cache_server<K: send, V: send>(c: chan<chan<command<K, V>>>) {
     let ctrl = port();
     send(c, chan(ctrl));
 }
diff --git a/src/test/run-pass/sendfn-generic-fn.rs b/src/test/run-pass/sendfn-generic-fn.rs
index 3c19958fa31..66177fd04ae 100644
--- a/src/test/run-pass/sendfn-generic-fn.rs
+++ b/src/test/run-pass/sendfn-generic-fn.rs
@@ -8,7 +8,7 @@ fn main() { test05(); }
 
 type pair<A,B> = { a: A, b: B };
 
-fn make_generic_record<copy A,copy B>(a: A, b: B) -> pair<A,B> {
+fn make_generic_record<A: copy, B: copy>(a: A, b: B) -> pair<A,B> {
     ret {a: a, b: b};
 }
 
@@ -24,7 +24,7 @@ fn test05_start(&&f: sendfn(&&float, &&str) -> pair<float, str>) {
     assert q.b == "Ho";
 }
 
-fn spawn<copy A, copy B>(f: fn(sendfn(A,B)->pair<A,B>)) {
+fn spawn<A: copy, B: copy>(f: fn(sendfn(A,B)->pair<A,B>)) {
     let arg = sendfn(a: A, b: B) -> pair<A,B> {
         ret make_generic_record(a, b);
     };
diff --git a/src/test/run-pass/type-param-constraints.rs b/src/test/run-pass/type-param-constraints.rs
index def6e72f4d9..7fdaa061ee6 100644
--- a/src/test/run-pass/type-param-constraints.rs
+++ b/src/test/run-pass/type-param-constraints.rs
@@ -1,6 +1,6 @@
 fn p_foo<T>(pinned: T) { }
-fn s_foo<copy T>(shared: T) { }
-fn u_foo<send T>(unique: T) { }
+fn s_foo<T: copy>(shared: T) { }
+fn u_foo<T: send>(unique: T) { }
 
 resource r(i: int) { }
 
diff --git a/src/test/run-pass/unchecked-predicates.rs b/src/test/run-pass/unchecked-predicates.rs
index 035b18f8051..e43cdaacb8b 100644
--- a/src/test/run-pass/unchecked-predicates.rs
+++ b/src/test/run-pass/unchecked-predicates.rs
@@ -7,7 +7,7 @@ import std::list::*;
 
 // Can't easily be written as a "pure fn" because there's
 // no syntax for specifying that f is pure.
-fn pure_foldl<copy T, copy U>(ls: list<T>, u: U, f: block(T, U) -> U) -> U {
+fn pure_foldl<T: copy, U: copy>(ls: list<T>, u: U, f: block(T, U) -> U) -> U {
     alt ls {
         nil. { u }
         cons(hd, tl) { f(hd, pure_foldl(*tl, f(hd, u), f)) }
@@ -16,18 +16,18 @@ fn pure_foldl<copy T, copy U>(ls: list<T>, u: U, f: block(T, U) -> U) -> U {
 
 // Shows how to use an "unchecked" block to call a general
 // fn from a pure fn
-pure fn pure_length<copy T>(ls: list<T>) -> uint {
+pure fn pure_length<T: copy>(ls: list<T>) -> uint {
     fn count<T>(_t: T, &&u: uint) -> uint { u + 1u }
     unchecked{ pure_foldl(ls, 0u, bind count(_, _)) }
 }
 
-pure fn nonempty_list<copy T>(ls: list<T>) -> bool { pure_length(ls) > 0u }
+pure fn nonempty_list<T: copy>(ls: list<T>) -> bool { pure_length(ls) > 0u }
 
 // Of course, the compiler can't take advantage of the
 // knowledge that ls is a cons node. Future work.
 // Also, this is pretty contrived since nonempty_list
 // could be a "tag refinement", if we implement those.
-fn safe_head<copy T>(ls: list<T>) : nonempty_list(ls) -> T {
+fn safe_head<T: copy>(ls: list<T>) : nonempty_list(ls) -> T {
     check is_not_empty(ls);
     ret head(ls)
 }
diff --git a/src/test/run-pass/unique-assign-generic.rs b/src/test/run-pass/unique-assign-generic.rs
index 372cca1c667..ba8b4bb5723 100644
--- a/src/test/run-pass/unique-assign-generic.rs
+++ b/src/test/run-pass/unique-assign-generic.rs
@@ -1,4 +1,4 @@
-fn f<copy T>(t: T) -> T {
+fn f<T: copy>(t: T) -> T {
     let t1 = t;
     t1
 }
diff --git a/src/test/run-pass/unique-generic-assign.rs b/src/test/run-pass/unique-generic-assign.rs
index 4370bb4a791..f8fd6f62c26 100644
--- a/src/test/run-pass/unique-generic-assign.rs
+++ b/src/test/run-pass/unique-generic-assign.rs
@@ -1,6 +1,6 @@
 // Issue #976
 
-fn f<copy T>(x: ~T) {
+fn f<T: copy>(x: ~T) {
     let _x2 = x;
 }
 fn main() { }
diff --git a/src/test/run-pass/unique-kinds.rs b/src/test/run-pass/unique-kinds.rs
index ab88437331c..4600081e45a 100644
--- a/src/test/run-pass/unique-kinds.rs
+++ b/src/test/run-pass/unique-kinds.rs
@@ -1,10 +1,10 @@
 fn sendable() {
 
-    fn f<send T>(i: T, j: T) {
+    fn f<T: send>(i: T, j: T) {
         assert i == j;
     }
 
-    fn g<send T>(i: T, j: T) {
+    fn g<T: send>(i: T, j: T) {
         assert i != j;
     }
 
@@ -18,11 +18,11 @@ fn sendable() {
 
 fn copyable() {
 
-    fn f<copy T>(i: T, j: T) {
+    fn f<T: copy>(i: T, j: T) {
         assert i == j;
     }
 
-    fn g<copy T>(i: T, j: T) {
+    fn g<T: copy>(i: T, j: T) {
         assert i != j;
     }
 
diff --git a/src/test/run-pass/vec-push.rs b/src/test/run-pass/vec-push.rs
index 92da692e482..bf6b7638eac 100644
--- a/src/test/run-pass/vec-push.rs
+++ b/src/test/run-pass/vec-push.rs
@@ -1,5 +1,5 @@
 
 
-fn push<copy T>(&v: [const T], t: T) { v += [t]; }
+fn push<T: copy>(&v: [const T], t: T) { v += [t]; }
 
 fn main() { let v = [1, 2, 3]; push(v, 1); }
diff --git a/src/test/stdtest/deque.rs b/src/test/stdtest/deque.rs
index a94b1739b32..ef763131a41 100644
--- a/src/test/stdtest/deque.rs
+++ b/src/test/stdtest/deque.rs
@@ -81,7 +81,7 @@ fn test_boxes(a: @int, b: @int, c: @int, d: @int) {
 
 type eqfn<T> = fn@(T, T) -> bool;
 
-fn test_parameterized<copy T>(e: eqfn<T>, a: T, b: T, c: T, d: T) {
+fn test_parameterized<T: copy>(e: eqfn<T>, a: T, b: T, c: T, d: T) {
     let deq: deque::t<T> = deque::create::<T>();
     assert (deq.size() == 0u);
     deq.add_front(a);
diff --git a/src/test/stdtest/task.rs b/src/test/stdtest/task.rs
index 31299e703be..3a08606f47e 100644
--- a/src/test/stdtest/task.rs
+++ b/src/test/stdtest/task.rs
@@ -70,7 +70,7 @@ fn test_join_convenient() {
 #[ignore]
 fn spawn_polymorphic() {
     // FIXME #1038: Can't spawn palymorphic functions
-    /*fn foo<send T>(x: T) { log(error, x); }
+    /*fn foo<T: send>(x: T) { log(error, x); }
 
     task::spawn(true, foo);
     task::spawn(42, foo);*/