diff --git a/src/test/bench/task-perf-word-count-generic.rs b/src/test/bench/task-perf-word-count-generic.rs index d2c6b5f5a5d..af2a4e2889d 100644 --- a/src/test/bench/task-perf-word-count-generic.rs +++ b/src/test/bench/task-perf-word-count-generic.rs @@ -55,25 +55,25 @@ mod map_reduce { export reducer; export map_reduce; - type putter = fn(K, V); + type putter = fn(K, V); // FIXME: the first K1 parameter should probably be a -, but that // doesn't parse at the moment. - type mapper = fn(K1, putter); + type mapper = fn(K1, putter); - type getter = fn() -> option; + type getter = fn() -> option; - type reducer = fn(K, getter); + type reducer = fn(K, getter); - tag ctrl_proto { + tag ctrl_proto { find_reducer(K, chan>>); mapper_done; } - tag reduce_proto { emit_val(V); done; ref; release; } + tag reduce_proto { emit_val(V); done; ref; release; } - fn start_mappers(map: mapper, + fn start_mappers(map: mapper, ctrl: chan>, inputs: [K1]) -> [joinable_task] { let tasks = []; @@ -84,15 +84,15 @@ mod map_reduce { ret tasks; } - fn map_task(-map: mapper, + fn map_task(-map: mapper, -ctrl: chan>, -input: K1) { // log_err "map_task " + input; let intermediates = treemap::init(); - fn emit(im: treemap::treemap>>, + fn emit(im: treemap::treemap>>, ctrl: chan>, key: K2, val: V) { let c; alt treemap::find(im, key) { @@ -110,15 +110,15 @@ mod map_reduce { map(input, bind emit(intermediates, ctrl, _, _)); - fn finish(_k: K, v: chan>) { + fn finish(_k: K, v: chan>) { send(v, release); } treemap::traverse(intermediates, finish); send(ctrl, mapper_done); } - fn reduce_task(-reduce: reducer, -key: K, + fn reduce_task(-reduce: reducer, -key: K, -out: chan>>) { let p = port(); @@ -127,7 +127,7 @@ mod map_reduce { let ref_count = 0; let is_done = false; - fn get(p: port>, + fn get(p: port>, &ref_count: int, &is_done: bool) -> option { while !is_done || ref_count > 0 { @@ -150,8 +150,8 @@ mod map_reduce { reduce(key, bind get(p, ref_count, is_done)); } - fn map_reduce(map: mapper, reduce: reducer, + fn map_reduce(map: mapper, reduce: reducer, inputs: [K1]) { let ctrl = port(); @@ -194,7 +194,7 @@ mod map_reduce { } } - fn finish(_k: K, v: chan>) { + fn finish(_k: K, v: chan>) { send(v, done); } treemap::traverse(reducers, finish); diff --git a/src/test/compile-fail/implicit-copy-2.rs b/src/test/compile-fail/implicit-copy-2.rs index 4ff190ee405..c56655ba322 100644 --- a/src/test/compile-fail/implicit-copy-2.rs +++ b/src/test/compile-fail/implicit-copy-2.rs @@ -4,7 +4,7 @@ resource r(i: @mutable int) { *i = *i + 1; } -fn movearg(i: T) { +fn movearg(i: T) { // Implicit copy to mutate reference i let j <- i; } diff --git a/src/test/compile-fail/unique-unique-kind.rs b/src/test/compile-fail/unique-unique-kind.rs index e2178668829..2504a4d6890 100644 --- a/src/test/compile-fail/unique-unique-kind.rs +++ b/src/test/compile-fail/unique-unique-kind.rs @@ -1,6 +1,6 @@ // error-pattern: needed unique type -fn f(i: T) { +fn f(i: T) { } fn main() { diff --git a/src/test/compile-fail/use-after-send.rs b/src/test/compile-fail/use-after-send.rs index 2a38a5f6d04..7a70292f526 100644 --- a/src/test/compile-fail/use-after-send.rs +++ b/src/test/compile-fail/use-after-send.rs @@ -1,5 +1,5 @@ // error-pattern: Unsatisfied precondition constraint -fn send(ch: _chan, -data: T) { log ch; log data; fail; } +fn send(ch: _chan, -data: T) { log ch; log data; fail; } type _chan = int; // Tests that "log message;" is flagged as using diff --git a/src/test/run-fail/bug-811.rs b/src/test/run-fail/bug-811.rs index 92e9062534a..c9ebbfe5d08 100644 --- a/src/test/run-fail/bug-811.rs +++ b/src/test/run-fail/bug-811.rs @@ -4,8 +4,8 @@ fn test00_start(ch: chan_t, message: int) { send(ch, message); } type task_id = int; type port_id = int; -type chan_t = {task: task_id, port: port_id}; +type chan_t = {task: task_id, port: port_id}; -fn send(ch: chan_t, -data: T) { fail; } +fn send(ch: chan_t, -data: T) { fail; } fn main() { fail "quux"; } diff --git a/src/test/run-fail/port-type.rs b/src/test/run-fail/port-type.rs index a648f0b560a..e9a4e0679b7 100644 --- a/src/test/run-fail/port-type.rs +++ b/src/test/run-fail/port-type.rs @@ -5,7 +5,7 @@ import std::comm::port; import std::comm::send; import std::comm::recv; -fn echo(c: chan, oc: chan>) { +fn echo(c: chan, oc: chan>) { // Tests that the type argument in port gets // visited let p = port::(); diff --git a/src/test/run-pass/fixed-point-bind-unique.rs b/src/test/run-pass/fixed-point-bind-unique.rs index 9e14ab19228..6fe82172814 100644 --- a/src/test/run-pass/fixed-point-bind-unique.rs +++ b/src/test/run-pass/fixed-point-bind-unique.rs @@ -1,8 +1,8 @@ -fn fix_help(f: fn(fn@(A) -> B, A) -> B, x: A) -> B { +fn fix_help(f: fn(fn@(A) -> B, A) -> B, x: A) -> B { ret f(bind fix_help(f, _), x); } -fn fix(f: fn(fn@(A) -> B, A) -> B) -> fn@(A) -> B { +fn fix(f: fn(fn@(A) -> B, A) -> B) -> fn@(A) -> B { ret bind fix_help(f, _); } diff --git a/src/test/run-pass/fn-bare-spawn.rs b/src/test/run-pass/fn-bare-spawn.rs index 19c59529870..e0da008d75c 100644 --- a/src/test/run-pass/fn-bare-spawn.rs +++ b/src/test/run-pass/fn-bare-spawn.rs @@ -1,6 +1,6 @@ // This is what the signature to spawn should look like with bare functions -fn spawn(val: T, f: fn(T)) { +fn spawn(val: T, f: fn(T)) { f(val); } diff --git a/src/test/run-pass/generic-alias-unique.rs b/src/test/run-pass/generic-alias-unique.rs index dbcbdcfae1a..d1b7598d35e 100644 --- a/src/test/run-pass/generic-alias-unique.rs +++ b/src/test/run-pass/generic-alias-unique.rs @@ -1,6 +1,6 @@ -fn id(t: T) -> T { ret t; } +fn id(t: T) -> T { ret t; } fn main() { let expected = ~100; diff --git a/src/test/run-pass/resource-in-struct.rs b/src/test/run-pass/resource-in-struct.rs index f815fcfd534..96cc02337cc 100644 --- a/src/test/run-pass/resource-in-struct.rs +++ b/src/test/run-pass/resource-in-struct.rs @@ -5,7 +5,7 @@ type closable = @mutable bool; resource close_res(i: closable) { *i = false; } -tag option { none; some(T); } +tag option { none; some(T); } fn sink(res: option) { } diff --git a/src/test/run-pass/send-type-inference.rs b/src/test/run-pass/send-type-inference.rs index 73c36e0cdb3..0cc9a45d062 100644 --- a/src/test/run-pass/send-type-inference.rs +++ b/src/test/run-pass/send-type-inference.rs @@ -4,9 +4,9 @@ import std::comm::send; import std::comm::port; // tests that ctrl's type gets inferred properly -type command = {key: K, val: V}; +type command = {key: K, val: V}; -fn cache_server(c: chan>>) { +fn cache_server(c: chan>>) { let ctrl = port(); send(c, chan(ctrl)); } diff --git a/src/test/run-pass/type-param-constraints.rs b/src/test/run-pass/type-param-constraints.rs index 293b1ae5118..445632e33b5 100644 --- a/src/test/run-pass/type-param-constraints.rs +++ b/src/test/run-pass/type-param-constraints.rs @@ -1,6 +1,6 @@ -fn p_foo(pinned: T) { } +fn p_foo(pinned: T) { } fn s_foo(shared: T) { } -fn u_foo(unique: T) { } +fn u_foo(unique: T) { } resource r(i: int) { } diff --git a/src/test/run-pass/unique-kinds.rs b/src/test/run-pass/unique-kinds.rs index 5378bddff2d..da8babb0b9a 100644 --- a/src/test/run-pass/unique-kinds.rs +++ b/src/test/run-pass/unique-kinds.rs @@ -1,10 +1,10 @@ fn unique() { - fn f(i: T, j: T) { + fn f(i: T, j: T) { assert i == j; } - fn g(i: T, j: T) { + fn g(i: T, j: T) { assert i != j; } @@ -36,11 +36,11 @@ fn shared() { fn pinned() { - fn f(i: T, j: T) { + fn f(i: T, j: T) { assert i == j; } - fn g(i: T, j: T) { + fn g(i: T, j: T) { assert i != j; } diff --git a/src/test/stdtest/task.rs b/src/test/stdtest/task.rs index b12636a58c0..1c983251937 100644 --- a/src/test/stdtest/task.rs +++ b/src/test/stdtest/task.rs @@ -80,7 +80,7 @@ fn test_join_convenient() { #[ignore] fn spawn_polymorphic() { // FIXME #1038: Can't spawn palymorphic functions - /*fn foo(x: T) { log_err x; } + /*fn foo(x: T) { log_err x; } task::spawn(true, foo); task::spawn(42, foo);*/