diff options
| author | Ben Blum <bblum@andrew.cmu.edu> | 2013-08-21 20:33:56 -0400 |
|---|---|---|
| committer | Ben Blum <bblum@andrew.cmu.edu> | 2013-08-21 20:33:56 -0400 |
| commit | b795fab046ca1b218785bee5ec5af7326ef9fc85 (patch) | |
| tree | 2d04a9a90d8aa78bb92ae0218c85bb7a2581f1d3 | |
| parent | 22ad36d75b18bb6b37d88fd5559c6873e50dd4c6 (diff) | |
| download | rust-b795fab046ca1b218785bee5ec5af7326ef9fc85.tar.gz rust-b795fab046ca1b218785bee5ec5af7326ef9fc85.zip | |
oops v2, apparently writing std::comm::stream() doesn't work on check-fast; fix this
5 files changed, 19 insertions, 10 deletions
diff --git a/src/test/compile-fail/builtin-superkinds-self-type.rs b/src/test/compile-fail/builtin-superkinds-self-type.rs index 75690edeb01..d7ee3aae4d5 100644 --- a/src/test/compile-fail/builtin-superkinds-self-type.rs +++ b/src/test/compile-fail/builtin-superkinds-self-type.rs @@ -11,8 +11,10 @@ // Tests (negatively) the ability for the Self type in default methods // to use capabilities granted by builtin kinds as supertraits. +use std::comm; + trait Foo : Freeze { - fn foo(self, chan: std::comm::Chan<Self>) { + fn foo(self, chan: comm::Chan<Self>) { chan.send(self); //~ ERROR does not fulfill `Send` } } @@ -20,7 +22,7 @@ trait Foo : Freeze { impl <T: Freeze> Foo for T { } fn main() { - let (p,c) = std::comm::stream(); + let (p,c) = comm::stream(); 1193182.foo(c); assert!(p.recv() == 1193182); } diff --git a/src/test/run-pass/builtin-superkinds-capabilities-transitive.rs b/src/test/run-pass/builtin-superkinds-capabilities-transitive.rs index ab5e58285d4..74a218ac469 100644 --- a/src/test/run-pass/builtin-superkinds-capabilities-transitive.rs +++ b/src/test/run-pass/builtin-superkinds-capabilities-transitive.rs @@ -14,18 +14,20 @@ // a Send. Basically this just makes sure rustc is using // each_bound_trait_and_supertraits in type_contents correctly. +use std::comm; + trait Bar : Send { } trait Foo : Bar { } impl <T: Send> Foo for T { } impl <T: Send> Bar for T { } -fn foo<T: Foo>(val: T, chan: std::comm::Chan<T>) { +fn foo<T: Foo>(val: T, chan: comm::Chan<T>) { chan.send(val); } fn main() { - let (p,c) = std::comm::stream(); + let (p,c) = comm::stream(); foo(31337, c); assert!(p.recv() == 31337); } diff --git a/src/test/run-pass/builtin-superkinds-capabilities-xc.rs b/src/test/run-pass/builtin-superkinds-capabilities-xc.rs index 6e722d4d538..ea61b91e3b9 100644 --- a/src/test/run-pass/builtin-superkinds-capabilities-xc.rs +++ b/src/test/run-pass/builtin-superkinds-capabilities-xc.rs @@ -17,6 +17,7 @@ extern mod trait_superkinds_in_metadata; use trait_superkinds_in_metadata::{RequiresRequiresFreezeAndSend, RequiresFreeze}; +use std::comm; #[deriving(Eq)] struct X<T>(T); @@ -24,12 +25,12 @@ struct X<T>(T); impl <T: Freeze> RequiresFreeze for X<T> { } impl <T: Freeze+Send> RequiresRequiresFreezeAndSend for X<T> { } -fn foo<T: RequiresRequiresFreezeAndSend>(val: T, chan: std::comm::Chan<T>) { +fn foo<T: RequiresRequiresFreezeAndSend>(val: T, chan: comm::Chan<T>) { chan.send(val); } fn main() { - let (p,c) = std::comm::stream(); + let (p,c) = comm::stream(); foo(X(31337), c); assert!(p.recv() == X(31337)); } diff --git a/src/test/run-pass/builtin-superkinds-capabilities.rs b/src/test/run-pass/builtin-superkinds-capabilities.rs index ebbb3d38694..c2d2129b1c1 100644 --- a/src/test/run-pass/builtin-superkinds-capabilities.rs +++ b/src/test/run-pass/builtin-superkinds-capabilities.rs @@ -12,16 +12,18 @@ // builtin-kinds, e.g., if a trait requires Send to implement, then // at usage site of that trait, we know we have the Send capability. +use std::comm; + trait Foo : Send { } impl <T: Send> Foo for T { } -fn foo<T: Foo>(val: T, chan: std::comm::Chan<T>) { +fn foo<T: Foo>(val: T, chan: comm::Chan<T>) { chan.send(val); } fn main() { - let (p,c) = std::comm::stream(); + let (p,c) = comm::stream(); foo(31337, c); assert!(p.recv() == 31337); } diff --git a/src/test/run-pass/builtin-superkinds-self-type.rs b/src/test/run-pass/builtin-superkinds-self-type.rs index da7f0fb5de9..2285c471c91 100644 --- a/src/test/run-pass/builtin-superkinds-self-type.rs +++ b/src/test/run-pass/builtin-superkinds-self-type.rs @@ -11,8 +11,10 @@ // Tests the ability for the Self type in default methods to use // capabilities granted by builtin kinds as supertraits. +use std::comm; + trait Foo : Send { - fn foo(self, chan: std::comm::Chan<Self>) { + fn foo(self, chan: comm::Chan<Self>) { chan.send(self); } } @@ -20,7 +22,7 @@ trait Foo : Send { impl <T: Send> Foo for T { } fn main() { - let (p,c) = std::comm::stream(); + let (p,c) = comm::stream(); 1193182.foo(c); assert!(p.recv() == 1193182); } |
