Fix fallout of removing default bounds
This is all purely fallout of getting the previous commit to compile.
This commit is contained in:
parent
bdd24b2a56
commit
bb9172d7b5
61 changed files with 378 additions and 364 deletions
|
|
@ -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");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
use std::task;
|
||||
|
||||
type RingBuffer = Vec<f64> ;
|
||||
type SamplesFn = proc(samples: &RingBuffer);
|
||||
type SamplesFn = proc:Send(samples: &RingBuffer);
|
||||
|
||||
enum Msg
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ fn d(x: ~Foo:Send) {
|
|||
}
|
||||
|
||||
fn e(x: ~Foo) { // sugar for ~Foo:Owned
|
||||
b(x);
|
||||
a(x);
|
||||
}
|
||||
|
||||
pub fn main() { }
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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> {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ enum maybe_pointy {
|
|||
struct Pointy {
|
||||
a : maybe_pointy,
|
||||
c : ~int,
|
||||
d : proc()->(),
|
||||
d : proc:Send()->(),
|
||||
}
|
||||
|
||||
fn empty_pointy() -> @RefCell<Pointy> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue