Skip to content

Commit b795fab

Browse files
committed
oops v2, apparently writing std::comm::stream() doesn't work on check-fast; fix this
1 parent 22ad36d commit b795fab

5 files changed

+19
-10
lines changed

src/test/compile-fail/builtin-superkinds-self-type.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,18 @@
1111
// Tests (negatively) the ability for the Self type in default methods
1212
// to use capabilities granted by builtin kinds as supertraits.
1313

14+
use std::comm;
15+
1416
trait Foo : Freeze {
15-
fn foo(self, chan: std::comm::Chan<Self>) {
17+
fn foo(self, chan: comm::Chan<Self>) {
1618
chan.send(self); //~ ERROR does not fulfill `Send`
1719
}
1820
}
1921

2022
impl <T: Freeze> Foo for T { }
2123

2224
fn main() {
23-
let (p,c) = std::comm::stream();
25+
let (p,c) = comm::stream();
2426
1193182.foo(c);
2527
assert!(p.recv() == 1193182);
2628
}

src/test/run-pass/builtin-superkinds-capabilities-transitive.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,20 @@
1414
// a Send. Basically this just makes sure rustc is using
1515
// each_bound_trait_and_supertraits in type_contents correctly.
1616

17+
use std::comm;
18+
1719
trait Bar : Send { }
1820
trait Foo : Bar { }
1921

2022
impl <T: Send> Foo for T { }
2123
impl <T: Send> Bar for T { }
2224

23-
fn foo<T: Foo>(val: T, chan: std::comm::Chan<T>) {
25+
fn foo<T: Foo>(val: T, chan: comm::Chan<T>) {
2426
chan.send(val);
2527
}
2628

2729
fn main() {
28-
let (p,c) = std::comm::stream();
30+
let (p,c) = comm::stream();
2931
foo(31337, c);
3032
assert!(p.recv() == 31337);
3133
}

src/test/run-pass/builtin-superkinds-capabilities-xc.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,20 @@
1717

1818
extern mod trait_superkinds_in_metadata;
1919
use trait_superkinds_in_metadata::{RequiresRequiresFreezeAndSend, RequiresFreeze};
20+
use std::comm;
2021

2122
#[deriving(Eq)]
2223
struct X<T>(T);
2324

2425
impl <T: Freeze> RequiresFreeze for X<T> { }
2526
impl <T: Freeze+Send> RequiresRequiresFreezeAndSend for X<T> { }
2627

27-
fn foo<T: RequiresRequiresFreezeAndSend>(val: T, chan: std::comm::Chan<T>) {
28+
fn foo<T: RequiresRequiresFreezeAndSend>(val: T, chan: comm::Chan<T>) {
2829
chan.send(val);
2930
}
3031

3132
fn main() {
32-
let (p,c) = std::comm::stream();
33+
let (p,c) = comm::stream();
3334
foo(X(31337), c);
3435
assert!(p.recv() == X(31337));
3536
}

src/test/run-pass/builtin-superkinds-capabilities.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@
1212
// builtin-kinds, e.g., if a trait requires Send to implement, then
1313
// at usage site of that trait, we know we have the Send capability.
1414

15+
use std::comm;
16+
1517
trait Foo : Send { }
1618

1719
impl <T: Send> Foo for T { }
1820

19-
fn foo<T: Foo>(val: T, chan: std::comm::Chan<T>) {
21+
fn foo<T: Foo>(val: T, chan: comm::Chan<T>) {
2022
chan.send(val);
2123
}
2224

2325
fn main() {
24-
let (p,c) = std::comm::stream();
26+
let (p,c) = comm::stream();
2527
foo(31337, c);
2628
assert!(p.recv() == 31337);
2729
}

src/test/run-pass/builtin-superkinds-self-type.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,18 @@
1111
// Tests the ability for the Self type in default methods to use
1212
// capabilities granted by builtin kinds as supertraits.
1313

14+
use std::comm;
15+
1416
trait Foo : Send {
15-
fn foo(self, chan: std::comm::Chan<Self>) {
17+
fn foo(self, chan: comm::Chan<Self>) {
1618
chan.send(self);
1719
}
1820
}
1921

2022
impl <T: Send> Foo for T { }
2123

2224
fn main() {
23-
let (p,c) = std::comm::stream();
25+
let (p,c) = comm::stream();
2426
1193182.foo(c);
2527
assert!(p.recv() == 1193182);
2628
}

0 commit comments

Comments
 (0)