Fallout of rewriting std::comm

This commit is contained in:
Alex Crichton 2013-12-05 18:19:06 -08:00
parent bfa9064ba2
commit 529e268ab9
86 changed files with 763 additions and 2588 deletions

View file

@ -8,10 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::comm;
fn main() {
let (p,c) = comm::stream();
let (p,c) = Chan::new();
let x = Some(p);
c.send(false);
match x {

View file

@ -11,10 +11,8 @@
// 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: comm::Chan<Self>) {
fn foo(self, mut chan: Chan<Self>) {
chan.send(self); //~ ERROR does not fulfill `Send`
}
}
@ -22,7 +20,7 @@ trait Foo : Freeze {
impl <T: Freeze> Foo for T { }
fn main() {
let (p,c) = comm::stream();
let (p,c) = Chan::new();
1193182.foo(c);
assert!(p.recv() == 1193182);
}

View file

@ -13,8 +13,6 @@
// Test that a class with an unsendable field can't be
// sent
use std::comm;
struct foo {
i: int,
j: @~str,
@ -29,6 +27,6 @@ fn foo(i:int, j: @~str) -> foo {
fn main() {
let cat = ~"kitty";
let (_, ch) = comm::stream(); //~ ERROR does not fulfill `Send`
let (_, ch) = Chan::new(); //~ ERROR does not fulfill `Send`
ch.send(foo(42, @(cat))); //~ ERROR does not fulfill `Send`
}