about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-03-08 18:21:49 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-03-27 10:14:50 -0700
commitbb9172d7b512c36f34d34b024640f030d1fde2eb (patch)
tree0e4ea18ae30a12954db6b9fbe95f62222ade9301 /src/test
parentbdd24b2a56e8bf6b952bd8880364fb0a57c2c540 (diff)
downloadrust-bb9172d7b512c36f34d34b024640f030d1fde2eb.tar.gz
rust-bb9172d7b512c36f34d34b024640f030d1fde2eb.zip
Fix fallout of removing default bounds
This is all purely fallout of getting the previous commit to compile.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/auxiliary/macro_crate_outlive_expansion_phase.rs4
-rw-r--r--src/test/compile-fail/issue-7013.rs4
-rw-r--r--src/test/compile-fail/kindck-nonsendable-1.rs7
-rw-r--r--src/test/compile-fail/trait-bounds-sugar.rs2
-rw-r--r--src/test/run-fail/fail-macro-any.rs2
-rw-r--r--src/test/run-fail/unwind-box-fn-unique.rs2
-rw-r--r--src/test/run-pass/capturing-logging.rs2
-rw-r--r--src/test/run-pass/clone-with-exterior.rs2
-rw-r--r--src/test/run-pass/issue-2190-1.rs4
-rw-r--r--src/test/run-pass/issue-3609.rs2
-rw-r--r--src/test/run-pass/sendfn-spawn-with-fn-arg.rs2
-rw-r--r--src/test/run-pass/tempfile.rs6
-rw-r--r--src/test/run-pass/trait-bounds-basic.rs2
-rw-r--r--src/test/run-pass/trait-cast.rs6
-rw-r--r--src/test/run-pass/uniq-cc-generic.rs7
-rw-r--r--src/test/run-pass/uniq-cc.rs2
16 files changed, 28 insertions, 28 deletions
diff --git a/src/test/auxiliary/macro_crate_outlive_expansion_phase.rs b/src/test/auxiliary/macro_crate_outlive_expansion_phase.rs
index 1a0fb8fe629..6dc62932de2 100644
--- a/src/test/auxiliary/macro_crate_outlive_expansion_phase.rs
+++ b/src/test/auxiliary/macro_crate_outlive_expansion_phase.rs
@@ -29,7 +29,7 @@ impl Drop for Foo {
 
 #[macro_registrar]
 pub fn registrar(_: |Name, SyntaxExtension|) {
-    local_data_key!(foo: ~Any);
-    local_data::set(foo, ~Foo { foo: 10 } as ~Any);
+    local_data_key!(foo: ~Any:Send);
+    local_data::set(foo, ~Foo { foo: 10 } as ~Any:Send);
 }
 
diff --git a/src/test/compile-fail/issue-7013.rs b/src/test/compile-fail/issue-7013.rs
index 5c84cbe00a9..6a7f01e6767 100644
--- a/src/test/compile-fail/issue-7013.rs
+++ b/src/test/compile-fail/issue-7013.rs
@@ -31,12 +31,12 @@ impl Foo for B
 
 struct A
 {
-    v: ~Foo,
+    v: ~Foo:Send,
 }
 
 fn main()
 {
-    let a = A {v: ~B{v: None} as ~Foo};
+    let a = A {v: ~B{v: None} as ~Foo:Send};
     //~^ ERROR cannot pack type `~B`, which does not fulfill `Send`
     let v = Rc::new(RefCell::new(a));
     let w = v.clone();
diff --git a/src/test/compile-fail/kindck-nonsendable-1.rs b/src/test/compile-fail/kindck-nonsendable-1.rs
index 02c58ba5ee3..5de2b6b4bb5 100644
--- a/src/test/compile-fail/kindck-nonsendable-1.rs
+++ b/src/test/compile-fail/kindck-nonsendable-1.rs
@@ -14,7 +14,8 @@ fn foo(_x: @uint) {}
 
 fn main() {
     let x = @3u;
-    let _: proc() = proc() foo(x); //~ ERROR does not fulfill `Send`
-    let _: proc() = proc() foo(x); //~ ERROR does not fulfill `Send`
-    let _: proc() = proc() foo(x); //~ ERROR does not fulfill `Send`
+    let _: proc:Send() = proc() foo(x); //~ ERROR does not fulfill `Send`
+    let _: proc:Send() = proc() foo(x); //~ ERROR does not fulfill `Send`
+    let _: proc:Send() = proc() foo(x); //~ ERROR does not fulfill `Send`
+    let _: proc() = proc() foo(x);
 }
diff --git a/src/test/compile-fail/trait-bounds-sugar.rs b/src/test/compile-fail/trait-bounds-sugar.rs
index 988057bc7b1..32c23a3efdd 100644
--- a/src/test/compile-fail/trait-bounds-sugar.rs
+++ b/src/test/compile-fail/trait-bounds-sugar.rs
@@ -12,7 +12,7 @@
 
 trait Foo {}
 
-fn a(_x: ~Foo) { // should be same as ~Foo:Send
+fn a(_x: ~Foo:Send) {
 }
 
 fn b(_x: &'static Foo) { // should be same as &'static Foo:'static
diff --git a/src/test/run-fail/fail-macro-any.rs b/src/test/run-fail/fail-macro-any.rs
index 9bedd8c8cc8..d812e19e1c8 100644
--- a/src/test/run-fail/fail-macro-any.rs
+++ b/src/test/run-fail/fail-macro-any.rs
@@ -11,5 +11,5 @@
 // error-pattern:failed at '~Any'
 
 fn main() {
-    fail!(~413 as ~::std::any::Any);
+    fail!(~413 as ~::std::any::Any:Send);
 }
diff --git a/src/test/run-fail/unwind-box-fn-unique.rs b/src/test/run-fail/unwind-box-fn-unique.rs
index a49760f3c58..4a6f37c91b7 100644
--- a/src/test/run-fail/unwind-box-fn-unique.rs
+++ b/src/test/run-fail/unwind-box-fn-unique.rs
@@ -18,7 +18,7 @@ fn failfn() {
 
 fn main() {
     let y = ~0;
-    let x: @proc() = @(proc() {
+    let x: @proc:Send() = @(proc() {
         println!("{:?}", y.clone());
     });
     failfn();
diff --git a/src/test/run-pass/capturing-logging.rs b/src/test/run-pass/capturing-logging.rs
index 97dfbb0d8e2..6c1b2f4653a 100644
--- a/src/test/run-pass/capturing-logging.rs
+++ b/src/test/run-pass/capturing-logging.rs
@@ -42,7 +42,7 @@ fn main() {
     let (tx, rx) = channel();
     let (mut r, w) = (ChanReader::new(rx), ChanWriter::new(tx));
     spawn(proc() {
-        set_logger(~MyWriter(w) as ~Logger);
+        set_logger(~MyWriter(w) as ~Logger:Send);
         debug!("debug");
         info!("info");
     });
diff --git a/src/test/run-pass/clone-with-exterior.rs b/src/test/run-pass/clone-with-exterior.rs
index 6db42c1e2ee..4f3db3a5f77 100644
--- a/src/test/run-pass/clone-with-exterior.rs
+++ b/src/test/run-pass/clone-with-exterior.rs
@@ -18,7 +18,7 @@ struct Pair {
 pub fn main() {
     let z = ~Pair { a : 10, b : 12};
 
-    let f: proc() = proc() {
+    let f: proc:Send() = proc() {
         assert_eq!(z.a, 10);
         assert_eq!(z.b, 12);
     };
diff --git a/src/test/run-pass/issue-2190-1.rs b/src/test/run-pass/issue-2190-1.rs
index 0580dd89a30..d04717e380b 100644
--- a/src/test/run-pass/issue-2190-1.rs
+++ b/src/test/run-pass/issue-2190-1.rs
@@ -12,13 +12,13 @@ use std::task;
 
 static generations: uint = 1024+256+128+49;
 
-fn spawn(f: proc()) {
+fn spawn(f: proc:Send()) {
     let mut t = task::task();
     t.opts.stack_size = Some(32 * 1024);
     t.spawn(f);
 }
 
-fn child_no(x: uint) -> proc() {
+fn child_no(x: uint) -> proc:Send() {
     proc() {
         if x < generations {
             spawn(child_no(x+1));
diff --git a/src/test/run-pass/issue-3609.rs b/src/test/run-pass/issue-3609.rs
index da620ffeb0d..1f1de9ddb9b 100644
--- a/src/test/run-pass/issue-3609.rs
+++ b/src/test/run-pass/issue-3609.rs
@@ -11,7 +11,7 @@
 use std::task;
 
 type RingBuffer = Vec<f64> ;
-type SamplesFn = proc(samples: &RingBuffer);
+type SamplesFn = proc:Send(samples: &RingBuffer);
 
 enum Msg
 {
diff --git a/src/test/run-pass/sendfn-spawn-with-fn-arg.rs b/src/test/run-pass/sendfn-spawn-with-fn-arg.rs
index 835b5990ac2..ac3dd80c383 100644
--- a/src/test/run-pass/sendfn-spawn-with-fn-arg.rs
+++ b/src/test/run-pass/sendfn-spawn-with-fn-arg.rs
@@ -18,7 +18,7 @@ fn test05_start(f: proc(int)) {
 
 fn test05() {
     let three = ~3;
-    let fn_to_send: proc(int) = proc(n) {
+    let fn_to_send: proc:Send(int) = proc(n) {
         println!("{}", *three + n); // will copy x into the closure
         assert_eq!(*three, 3);
     };
diff --git a/src/test/run-pass/tempfile.rs b/src/test/run-pass/tempfile.rs
index 873269190c5..e2806421518 100644
--- a/src/test/run-pass/tempfile.rs
+++ b/src/test/run-pass/tempfile.rs
@@ -36,7 +36,7 @@ fn test_tempdir() {
 
 fn test_rm_tempdir() {
     let (tx, rx) = channel();
-    let f: proc() = proc() {
+    let f: proc:Send() = proc() {
         let tmp = TempDir::new("test_rm_tempdir").unwrap();
         tx.send(tmp.path().clone());
         fail!("fail to unwind past `tmp`");
@@ -47,7 +47,7 @@ fn test_rm_tempdir() {
 
     let tmp = TempDir::new("test_rm_tempdir").unwrap();
     let path = tmp.path().clone();
-    let f: proc() = proc() {
+    let f: proc:Send() = proc() {
         let _tmp = tmp;
         fail!("fail to unwind past `tmp`");
     };
@@ -56,7 +56,7 @@ fn test_rm_tempdir() {
 
     let path;
     {
-        let f: proc() -> TempDir = proc() {
+        let f = proc() {
             TempDir::new("test_rm_tempdir").unwrap()
         };
         let tmp = task::try(f).ok().expect("test_rm_tmdir");
diff --git a/src/test/run-pass/trait-bounds-basic.rs b/src/test/run-pass/trait-bounds-basic.rs
index acc3ca508b2..6059e5e95ee 100644
--- a/src/test/run-pass/trait-bounds-basic.rs
+++ b/src/test/run-pass/trait-bounds-basic.rs
@@ -26,7 +26,7 @@ fn d(x: ~Foo:Send) {
 }
 
 fn e(x: ~Foo) { // sugar for ~Foo:Owned
-    b(x);
+    a(x);
 }
 
 pub fn main() { }
diff --git a/src/test/run-pass/trait-cast.rs b/src/test/run-pass/trait-cast.rs
index 490c77d98cd..7a53df8737c 100644
--- a/src/test/run-pass/trait-cast.rs
+++ b/src/test/run-pass/trait-cast.rs
@@ -18,7 +18,7 @@ struct Tree(@RefCell<TreeR>);
 struct TreeR {
     left: Option<Tree>,
     right: Option<Tree>,
-    val: ~to_str
+    val: ~to_str:Send
 }
 
 trait to_str {
@@ -53,10 +53,10 @@ fn foo<T:to_str>(x: T) -> ~str { x.to_str_() }
 pub fn main() {
     let t1 = Tree(@RefCell::new(TreeR{left: None,
                                       right: None,
-                                      val: ~1 as ~to_str}));
+                                      val: ~1 as ~to_str:Send}));
     let t2 = Tree(@RefCell::new(TreeR{left: Some(t1),
                                       right: Some(t1),
-                                      val: ~2 as ~to_str}));
+                                      val: ~2 as ~to_str:Send}));
     let expected = ~"[2, some([1, none, none]), some([1, none, none])]";
     assert!(t2.to_str_() == expected);
     assert!(foo(t2) == expected);
diff --git a/src/test/run-pass/uniq-cc-generic.rs b/src/test/run-pass/uniq-cc-generic.rs
index 41e921ff6e4..78fa7520f33 100644
--- a/src/test/run-pass/uniq-cc-generic.rs
+++ b/src/test/run-pass/uniq-cc-generic.rs
@@ -19,12 +19,11 @@ enum maybe_pointy {
 
 struct Pointy {
     a : maybe_pointy,
-    d : proc() -> uint,
+    d : proc:Send() -> uint,
 }
 
-fn make_uniq_closure<A:Send>(a: A) -> proc() -> uint {
-    let result: proc() -> uint = proc() &a as *A as uint;
-    result
+fn make_uniq_closure<A:Send>(a: A) -> proc:Send() -> uint {
+    proc() { &a as *A as uint }
 }
 
 fn empty_pointy() -> @RefCell<Pointy> {
diff --git a/src/test/run-pass/uniq-cc.rs b/src/test/run-pass/uniq-cc.rs
index 57fc9ac6773..aa048a239db 100644
--- a/src/test/run-pass/uniq-cc.rs
+++ b/src/test/run-pass/uniq-cc.rs
@@ -20,7 +20,7 @@ enum maybe_pointy {
 struct Pointy {
     a : maybe_pointy,
     c : ~int,
-    d : proc()->(),
+    d : proc:Send()->(),
 }
 
 fn empty_pointy() -> @RefCell<Pointy> {