diff options
| author | Graydon Hoare <[email protected]> | 2011-04-19 13:35:49 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-04-19 13:35:49 -0700 |
| commit | d2bd07dcb02783063375b6c8532fceaf9fa9d50f (patch) | |
| tree | a253b5eadb140d14bc99d1456e316ce1e210a6be /src/test/run-pass | |
| parent | rustc: Allow glue to be emitted even for scalar types; this is necessary to s... (diff) | |
| download | rust-d2bd07dcb02783063375b6c8532fceaf9fa9d50f.tar.xz rust-d2bd07dcb02783063375b6c8532fceaf9fa9d50f.zip | |
Remove effect system from src.
Diffstat (limited to 'src/test/run-pass')
39 files changed, 94 insertions, 94 deletions
diff --git a/src/test/run-pass/acyclic-unwind.rs b/src/test/run-pass/acyclic-unwind.rs index 4df67c9b..3f3b108c 100644 --- a/src/test/run-pass/acyclic-unwind.rs +++ b/src/test/run-pass/acyclic-unwind.rs @@ -1,7 +1,7 @@ // xfail-stage0 // -*- rust -*- -impure fn f(chan[int] c) +fn f(chan[int] c) { type t = tup(int,int,int); @@ -24,7 +24,7 @@ impure fn f(chan[int] c) } -impure fn main() { +fn main() { let port[int] p = port(); spawn f(chan(p)); let int i; diff --git a/src/test/run-pass/basic-1.rs b/src/test/run-pass/basic-1.rs index 5697eea4..d861e45d 100644 --- a/src/test/run-pass/basic-1.rs +++ b/src/test/run-pass/basic-1.rs @@ -1,11 +1,11 @@ // xfail-stage0 // -*- rust -*- -impure fn a(chan[int] c) { +fn a(chan[int] c) { c <| 10; } -impure fn main() { +fn main() { let port[int] p = port(); spawn a(chan(p)); spawn b(chan(p)); @@ -15,7 +15,7 @@ impure fn main() { // log "Finished."; } -impure fn b(chan[int] c) { +fn b(chan[int] c) { // log "task b0"; // log "task b1"; // log "task b2"; diff --git a/src/test/run-pass/basic-2.rs b/src/test/run-pass/basic-2.rs index d7336684..5bd9e823 100644 --- a/src/test/run-pass/basic-2.rs +++ b/src/test/run-pass/basic-2.rs @@ -1,13 +1,13 @@ // xfail-stage0 // -*- rust -*- -impure fn a(chan[int] c) { +fn a(chan[int] c) { log "task a0"; log "task a1"; c <| 10; } -impure fn main() { +fn main() { let port[int] p = port(); spawn a(chan(p)); spawn b(chan(p)); @@ -17,7 +17,7 @@ impure fn main() { log "Finished."; } -impure fn b(chan[int] c) { +fn b(chan[int] c) { log "task b0"; log "task b1"; log "task b2"; diff --git a/src/test/run-pass/basic.rs b/src/test/run-pass/basic.rs index 7495f037..e538d4f2 100644 --- a/src/test/run-pass/basic.rs +++ b/src/test/run-pass/basic.rs @@ -1,7 +1,7 @@ // xfail-stage0 // -*- rust -*- -impure fn a(chan[int] c) { +fn a(chan[int] c) { if (true) { log "task a"; log "task a"; @@ -23,7 +23,7 @@ fn g(int x, str y) -> int { ret z; } -impure fn main() { +fn main() { let int n = 2 + 3 * 7; let str s = "hello there"; let port[int] p = port(); @@ -38,7 +38,7 @@ impure fn main() { log "children finished, root finishing"; } -impure fn b(chan[int] c) { +fn b(chan[int] c) { if (true) { log "task b"; log "task b"; diff --git a/src/test/run-pass/box-in-tup.rs b/src/test/run-pass/box-in-tup.rs index b1ae7907..53f3dc0f 100644 --- a/src/test/run-pass/box-in-tup.rs +++ b/src/test/run-pass/box-in-tup.rs @@ -1,4 +1,4 @@ -impure fn main() { +fn main() { let tup(mutable @int) i = tup(mutable @10); i._0 = @11; }
\ No newline at end of file diff --git a/src/test/run-pass/comm.rs b/src/test/run-pass/comm.rs index 93ccacfc..2bca6248 100644 --- a/src/test/run-pass/comm.rs +++ b/src/test/run-pass/comm.rs @@ -1,7 +1,7 @@ // xfail-stage0 // -*- rust -*- -impure fn main() { +fn main() { let port[int] p = port(); spawn child(chan(p)); let int y; @@ -11,7 +11,7 @@ impure fn main() { check (y == 10); } -impure fn child(chan[int] c) { +fn child(chan[int] c) { c <| 10; } diff --git a/src/test/run-pass/decl-with-recv.rs b/src/test/run-pass/decl-with-recv.rs index 7698ee01..5630d2e2 100644 --- a/src/test/run-pass/decl-with-recv.rs +++ b/src/test/run-pass/decl-with-recv.rs @@ -1,6 +1,6 @@ // -*- rust -*- -impure fn main() { +fn main() { let port[int] po = port(); let chan[int] ch = chan(po); diff --git a/src/test/run-pass/deref-lval.rs b/src/test/run-pass/deref-lval.rs index cd17329b..ff76f9e6 100644 --- a/src/test/run-pass/deref-lval.rs +++ b/src/test/run-pass/deref-lval.rs @@ -1,4 +1,4 @@ -impure fn main() { +fn main() { auto x = @mutable 5; *x = 1000; log *x; diff --git a/src/test/run-pass/exterior.rs b/src/test/run-pass/exterior.rs index e131e38d..f09ee823 100644 --- a/src/test/run-pass/exterior.rs +++ b/src/test/run-pass/exterior.rs @@ -2,13 +2,13 @@ type point = rec(int x, int y, mutable int z); -impure fn f(@point p) { +fn f(@point p) { check (p.z == 12); p.z = 13; check (p.z == 13); } -impure fn main() { +fn main() { let point a = rec(x=10, y=11, mutable z=12); let @point b = @a; check (b.z == 12); diff --git a/src/test/run-pass/foreach-nested-2.rs b/src/test/run-pass/foreach-nested-2.rs index 1c90a653..d25405d8 100644 --- a/src/test/run-pass/foreach-nested-2.rs +++ b/src/test/run-pass/foreach-nested-2.rs @@ -13,7 +13,7 @@ iter range(int start, int stop) -> int { } } -impure fn main() { +fn main() { let vec[mutable int] a = vec(mutable -1, -1, -1, -1, -1, -1, -1, -1); let int p = 0; diff --git a/src/test/run-pass/foreach-nested.rs b/src/test/run-pass/foreach-nested.rs index 9d775123..a655f591 100644 --- a/src/test/run-pass/foreach-nested.rs +++ b/src/test/run-pass/foreach-nested.rs @@ -5,7 +5,7 @@ iter two() -> int { put 1; } -impure fn main() { +fn main() { let vec[mutable int] a = vec(mutable -1, -1, -1, -1); let int p = 0; diff --git a/src/test/run-pass/lazychan.rs b/src/test/run-pass/lazychan.rs index adc14434..6face271 100644 --- a/src/test/run-pass/lazychan.rs +++ b/src/test/run-pass/lazychan.rs @@ -1,7 +1,7 @@ // xfail-stage0 // -*- rust -*- -impure fn main() { +fn main() { let port[int] p = port(); auto c = chan(p); let int y; @@ -19,6 +19,6 @@ impure fn main() { check (y == 10); } -impure fn child(chan[int] c) { +fn child(chan[int] c) { c <| 10; } diff --git a/src/test/run-pass/lib-bitv.rs b/src/test/run-pass/lib-bitv.rs index 3bd5a03a..5ff79079 100644 --- a/src/test/run-pass/lib-bitv.rs +++ b/src/test/run-pass/lib-bitv.rs @@ -23,7 +23,7 @@ fn test_1_element() { check (bitv.eq_vec(act, vec(1u))); } -impure fn test_10_elements() { +fn test_10_elements() { auto act; // all 0 @@ -61,7 +61,7 @@ impure fn test_10_elements() { check (bitv.eq_vec(act, vec(1u, 0u, 0u, 1u, 0u, 0u, 1u, 0u, 0u, 1u))); } -impure fn test_31_elements() { +fn test_31_elements() { auto act; // all 0 @@ -133,7 +133,7 @@ impure fn test_31_elements() { 0u, 0u, 0u, 0u, 0u, 0u, 1u))); } -impure fn test_32_elements() { +fn test_32_elements() { auto act; // all 0 @@ -207,7 +207,7 @@ impure fn test_32_elements() { 0u, 0u, 0u, 0u, 0u, 0u, 1u, 1u))); } -impure fn test_33_elements() { +fn test_33_elements() { auto act; // all 0 @@ -288,7 +288,7 @@ impure fn test_33_elements() { 1u))); } -impure fn main() { +fn main() { test_0_elements(); test_1_element(); test_10_elements(); diff --git a/src/test/run-pass/many.rs b/src/test/run-pass/many.rs index 8fe47133..f83ab4fb 100644 --- a/src/test/run-pass/many.rs +++ b/src/test/run-pass/many.rs @@ -2,7 +2,7 @@ // xfail-stage0 // -*- rust -*- -impure fn sub(chan[int] parent, int id) { +fn sub(chan[int] parent, int id) { if (id == 0) { parent <| 0; } else { @@ -13,7 +13,7 @@ impure fn sub(chan[int] parent, int id) { } } -impure fn main() { +fn main() { let port[int] p = port(); auto child = spawn sub(chan(p), 500); let int y <- p; diff --git a/src/test/run-pass/native-mod-src/inner.rs b/src/test/run-pass/native-mod-src/inner.rs index 546b2291..86dbd403 100644 --- a/src/test/run-pass/native-mod-src/inner.rs +++ b/src/test/run-pass/native-mod-src/inner.rs @@ -1,6 +1,6 @@ // -*- rust -*- -unsafe fn main() { +fn main() { auto f = "Makefile"; auto s = rustrt.str_buf(f); auto buf = libc.malloc(1024); diff --git a/src/test/run-pass/native-src/native.rs b/src/test/run-pass/native-src/native.rs index 22658095..2a5966c8 100644 --- a/src/test/run-pass/native-src/native.rs +++ b/src/test/run-pass/native-src/native.rs @@ -1,6 +1,6 @@ // -*- rust -*- -unsafe fn main() { +fn main() { libc.puts(rustrt.str_buf("hello, native world 1")); libc.puts(rustrt.str_buf("hello, native world 2")); libc.puts(rustrt.str_buf("hello, native world 3")); diff --git a/src/test/run-pass/obj-dtor.rs b/src/test/run-pass/obj-dtor.rs index 389675da..3d633e72 100644 --- a/src/test/run-pass/obj-dtor.rs +++ b/src/test/run-pass/obj-dtor.rs @@ -6,7 +6,7 @@ obj worker(chan[int] c) { } } -impure fn do_work(chan[int] c) { +fn do_work(chan[int] c) { log "in child task"; { let worker w = worker(c); @@ -21,7 +21,7 @@ impure fn do_work(chan[int] c) { } } -impure fn main() { +fn main() { let port[int] p = port(); log "spawning worker"; auto w = spawn do_work(chan(p)); diff --git a/src/test/run-pass/obj-self-2.rs b/src/test/run-pass/obj-self-2.rs index 68e9ec55..9668ce42 100644 --- a/src/test/run-pass/obj-self-2.rs +++ b/src/test/run-pass/obj-self-2.rs @@ -2,11 +2,11 @@ fn main() { obj foo() { - impure fn m1(mutable int i) { + fn m1(mutable int i) { i += 1; log "hi!"; } - impure fn m2(mutable int i) { + fn m2(mutable int i) { i += 1; self.m1(i); } diff --git a/src/test/run-pass/obj-self-3.rs b/src/test/run-pass/obj-self-3.rs index 0c0a4b79..f777b56c 100644 --- a/src/test/run-pass/obj-self-3.rs +++ b/src/test/run-pass/obj-self-3.rs @@ -2,14 +2,14 @@ fn main() { obj foo() { - impure fn m1(mutable int i) -> int { + fn m1(mutable int i) -> int { i += 1; ret i; } - impure fn m2(mutable int i) -> int { + fn m2(mutable int i) -> int { ret self.m1(i); } - impure fn m3(mutable int i) -> int { + fn m3(mutable int i) -> int { i += 1; ret self.m1(i); } diff --git a/src/test/run-pass/preempt.rs b/src/test/run-pass/preempt.rs index 42d6229d..cbbe1a0a 100644 --- a/src/test/run-pass/preempt.rs +++ b/src/test/run-pass/preempt.rs @@ -1,7 +1,7 @@ // xfail-stage0 // This checks that preemption works. -impure fn starve_main(chan[int] alive) { +fn starve_main(chan[int] alive) { log "signalling main"; alive <| 1; log "starving main"; @@ -11,7 +11,7 @@ impure fn starve_main(chan[int] alive) { } } -impure fn main() { +fn main() { let port[int] alive = port(); log "main started"; let task s = spawn starve_main(chan(alive)); diff --git a/src/test/run-pass/rt-circular-buffer.rs b/src/test/run-pass/rt-circular-buffer.rs index 17078116..364e38ea 100644 --- a/src/test/run-pass/rt-circular-buffer.rs +++ b/src/test/run-pass/rt-circular-buffer.rs @@ -17,7 +17,7 @@ type record = rec(u32 val1, u32 val2, u32 val3); // then the minimum buffer size needs to be 96. That's not a // power of two so needs to be rounded up. Don't trigger any // assertions. -impure fn test_init() { +fn test_init() { let port[record] myport = port(); auto mychan = chan(myport); @@ -28,7 +28,7 @@ impure fn test_init() { // Dump lots of items into the channel so it has to grow. // Don't trigger any assertions. -impure fn test_grow() { +fn test_grow() { let port[record] myport = port(); auto mychan = chan(myport); @@ -40,7 +40,7 @@ impure fn test_grow() { } // Don't allow the buffer to shrink below it's original size -impure fn test_shrink1() { +fn test_shrink1() { let port[i8] myport = port(); auto mychan = chan(myport); @@ -48,7 +48,7 @@ impure fn test_shrink1() { auto x <- myport; } -impure fn test_shrink2() { +fn test_shrink2() { let port[record] myport = port(); auto mychan = chan(myport); @@ -64,7 +64,7 @@ impure fn test_shrink2() { } // Test rotating the buffer when the unit size is not a power of two -impure fn test_rotate() { +fn test_rotate() { let port[record] myport = port(); auto mychan = chan(myport); @@ -83,7 +83,7 @@ impure fn test_rotate() { // Test rotating and growing the buffer when // the unit size is not a power of two -impure fn test_rotate_grow() { +fn test_rotate_grow() { let port[record] myport = port(); auto mychan = chan(myport); @@ -104,7 +104,7 @@ impure fn test_rotate_grow() { } } -impure fn main() { +fn main() { test_init(); test_grow(); test_shrink1(); diff --git a/src/test/run-pass/task-comm-0.rs b/src/test/run-pass/task-comm-0.rs index 9030340c..e1473548 100644 --- a/src/test/run-pass/task-comm-0.rs +++ b/src/test/run-pass/task-comm-0.rs @@ -1,15 +1,15 @@ // xfail-stage0 -impure fn main() -> () { +fn main() -> () { test05(); } -impure fn test05_start(chan[int] ch) { +fn test05_start(chan[int] ch) { ch <| 10; ch <| 20; ch <| 30; } -impure fn test05() { +fn test05() { let port[int] po = port(); let chan[int] ch = chan(po); spawn test05_start(chan(po)); diff --git a/src/test/run-pass/task-comm-10.rs b/src/test/run-pass/task-comm-10.rs index 6932f7e0..3c504ea7 100644 --- a/src/test/run-pass/task-comm-10.rs +++ b/src/test/run-pass/task-comm-10.rs @@ -1,13 +1,13 @@ // xfail-boot // xfail-stage0 -impure fn start(chan[chan[str]] c) { +fn start(chan[chan[str]] c) { let port[str] p = port(); c <| chan(p); auto a <- p; // auto b <- p; // Never read the second string. } -impure fn main() { +fn main() { let port[chan[str]] p = port(); auto child = spawn "start" start(chan(p)); auto c <- p; diff --git a/src/test/run-pass/task-comm-11.rs b/src/test/run-pass/task-comm-11.rs index 6de447ae..239e7933 100644 --- a/src/test/run-pass/task-comm-11.rs +++ b/src/test/run-pass/task-comm-11.rs @@ -1,10 +1,10 @@ // xfail-stage0 -impure fn start(chan[chan[str]] c) { +fn start(chan[chan[str]] c) { let port[str] p = port(); c <| chan(p); } -impure fn main() { +fn main() { let port[chan[str]] p = port(); auto child = spawn "child" start(chan(p)); auto c <- p; diff --git a/src/test/run-pass/task-comm-13-thread.rs b/src/test/run-pass/task-comm-13-thread.rs index 2fb32f95..1ad8ac7a 100644 --- a/src/test/run-pass/task-comm-13-thread.rs +++ b/src/test/run-pass/task-comm-13-thread.rs @@ -2,7 +2,7 @@ use std; import std._task; -impure fn start(chan[int] c, int start, int number_of_messages) { +fn start(chan[int] c, int start, int number_of_messages) { let int i = 0; while (i < number_of_messages) { c <| start + i; diff --git a/src/test/run-pass/task-comm-13.rs b/src/test/run-pass/task-comm-13.rs index 719edbb7..ee612ca0 100644 --- a/src/test/run-pass/task-comm-13.rs +++ b/src/test/run-pass/task-comm-13.rs @@ -2,7 +2,7 @@ use std; import std._task; -impure fn start(chan[int] c, int start, int number_of_messages) { +fn start(chan[int] c, int start, int number_of_messages) { let int i = 0; while (i < number_of_messages) { c <| start + i; diff --git a/src/test/run-pass/task-comm-15.rs b/src/test/run-pass/task-comm-15.rs index 1eee1a09..197c6005 100644 --- a/src/test/run-pass/task-comm-15.rs +++ b/src/test/run-pass/task-comm-15.rs @@ -1,6 +1,6 @@ // xfail-boot // xfail-stage0 -impure fn start(chan[int] c, int n) { +fn start(chan[int] c, int n) { let int i = n; while(i > 0) { @@ -9,7 +9,7 @@ impure fn start(chan[int] c, int n) { } } -impure fn main() { +fn main() { let port[int] p = port(); // Spawn a task that sends us back messages. The parent task // is likely to terminate before the child completes, so from diff --git a/src/test/run-pass/task-comm-16.rs b/src/test/run-pass/task-comm-16.rs index a4944410..16c4b93b 100644 --- a/src/test/run-pass/task-comm-16.rs +++ b/src/test/run-pass/task-comm-16.rs @@ -2,7 +2,7 @@ // Tests of ports and channels on various types -impure fn test_rec() { +fn test_rec() { type r = rec(int val0, u8 val1, char val2); let port[r] po = port(); @@ -19,7 +19,7 @@ impure fn test_rec() { check (r1.val2 == '2'); } -impure fn test_vec() { +fn test_vec() { let port[vec[int]] po = port(); let chan[vec[int]] ch = chan(po); let vec[int] v0 = vec(0, 1, 2); @@ -34,7 +34,7 @@ impure fn test_vec() { check (v1.(2) == 2); } -impure fn test_str() { +fn test_str() { let port[str] po = port(); let chan[str] ch = chan(po); let str s0 = "test"; @@ -50,7 +50,7 @@ impure fn test_str() { check (s1.(3) as u8 == 't' as u8); } -impure fn test_tup() { +fn test_tup() { type t = tup(int, u8, char); let port[t] po = port(); @@ -67,7 +67,7 @@ impure fn test_tup() { check (t0._2 == '2'); } -impure fn test_tag() { +fn test_tag() { tag t { tag1; tag2(int); @@ -91,7 +91,7 @@ impure fn test_tag() { check (t1 == tag3(10, 11u8, 'A')); } -impure fn test_chan() { +fn test_chan() { let port[chan[int]] po = port(); let chan[chan[int]] ch = chan(po); @@ -112,7 +112,7 @@ impure fn test_chan() { check (i == 10); } -impure fn main() { +fn main() { test_rec(); test_vec(); test_str(); diff --git a/src/test/run-pass/task-comm-3.rs b/src/test/run-pass/task-comm-3.rs index b172a099..71255721 100644 --- a/src/test/run-pass/task-comm-3.rs +++ b/src/test/run-pass/task-comm-3.rs @@ -1,13 +1,13 @@ // xfail-boot // xfail-stage0 -impure fn main() -> () { +fn main() -> () { log "===== WITHOUT THREADS ====="; test00(false); log "====== WITH THREADS ======"; test00(true); } -impure fn test00_start(chan[int] ch, int message, int count) { +fn test00_start(chan[int] ch, int message, int count) { log "Starting test00_start"; let int i = 0; while (i < count) { @@ -18,7 +18,7 @@ impure fn test00_start(chan[int] ch, int message, int count) { log "Ending test00_start"; } -impure fn test00(bool is_multithreaded) { +fn test00(bool is_multithreaded) { let int number_of_tasks = 16; let int number_of_messages = 4; diff --git a/src/test/run-pass/task-comm-4.rs b/src/test/run-pass/task-comm-4.rs index 31b94603..121a9e6e 100644 --- a/src/test/run-pass/task-comm-4.rs +++ b/src/test/run-pass/task-comm-4.rs @@ -1,8 +1,8 @@ -impure fn main() -> () { +fn main() -> () { test00(); } -impure fn test00() { +fn test00() { let int r = 0; let int sum = 0; let port[int] p = port(); diff --git a/src/test/run-pass/task-comm-5.rs b/src/test/run-pass/task-comm-5.rs index 76606094..d0f3994e 100644 --- a/src/test/run-pass/task-comm-5.rs +++ b/src/test/run-pass/task-comm-5.rs @@ -1,8 +1,8 @@ -impure fn main() -> () { +fn main() -> () { test00(); } -impure fn test00() { +fn test00() { let int r = 0; let int sum = 0; let port[int] p = port(); diff --git a/src/test/run-pass/task-comm-6.rs b/src/test/run-pass/task-comm-6.rs index 4ab97135..74b40a90 100644 --- a/src/test/run-pass/task-comm-6.rs +++ b/src/test/run-pass/task-comm-6.rs @@ -1,8 +1,8 @@ -impure fn main() -> () { +fn main() -> () { test00(); } -impure fn test00() { +fn test00() { let int r = 0; let int sum = 0; let port[int] p = port(); diff --git a/src/test/run-pass/task-comm-7.rs b/src/test/run-pass/task-comm-7.rs index 599d2d83..b5b95db9 100644 --- a/src/test/run-pass/task-comm-7.rs +++ b/src/test/run-pass/task-comm-7.rs @@ -1,9 +1,9 @@ // xfail-stage0 -impure fn main() -> () { +fn main() -> () { test00(); } -impure fn test00_start(chan[int] c, int start, int number_of_messages) { +fn test00_start(chan[int] c, int start, int number_of_messages) { let int i = 0; while (i < number_of_messages) { c <| start + i; @@ -11,7 +11,7 @@ impure fn test00_start(chan[int] c, int start, int number_of_messages) { } } -impure fn test00() { +fn test00() { let int r = 0; let int sum = 0; let port[int] p = port(); diff --git a/src/test/run-pass/task-comm-8.rs b/src/test/run-pass/task-comm-8.rs index 1bc02660..a3876bda 100644 --- a/src/test/run-pass/task-comm-8.rs +++ b/src/test/run-pass/task-comm-8.rs @@ -1,10 +1,10 @@ // xfail-boot // xfail-stage0 -impure fn main() -> () { +fn main() -> () { test00(); } -impure fn test00_start(chan[int] c, int start, int number_of_messages) { +fn test00_start(chan[int] c, int start, int number_of_messages) { let int i = 0; while (i < number_of_messages) { c <| start + i; @@ -12,7 +12,7 @@ impure fn test00_start(chan[int] c, int start, int number_of_messages) { } } -impure fn test00() { +fn test00() { let int r = 0; let int sum = 0; let port[int] p = port(); diff --git a/src/test/run-pass/task-comm-9.rs b/src/test/run-pass/task-comm-9.rs index cf375853..a9ac1688 100644 --- a/src/test/run-pass/task-comm-9.rs +++ b/src/test/run-pass/task-comm-9.rs @@ -1,10 +1,10 @@ // xfail-boot // xfail-stage0 -impure fn main() -> () { +fn main() -> () { test00(); } -impure fn test00_start(chan[int] c, int number_of_messages) { +fn test00_start(chan[int] c, int number_of_messages) { let int i = 0; while (i < number_of_messages) { c <| i; @@ -12,7 +12,7 @@ impure fn test00_start(chan[int] c, int number_of_messages) { } } -impure fn test00() { +fn test00() { let int r = 0; let int sum = 0; let port[int] p = port(); diff --git a/src/test/run-pass/task-comm-chan-nil.rs b/src/test/run-pass/task-comm-chan-nil.rs index a341d939..aae788a5 100644 --- a/src/test/run-pass/task-comm-chan-nil.rs +++ b/src/test/run-pass/task-comm-chan-nil.rs @@ -5,7 +5,7 @@ // any size, but rustc currently can because they do have size. Whether // or not this is desirable I don't know, but here's a regression test. -impure fn main() { +fn main() { let port[()] po = port(); let chan[()] ch = chan(po); diff --git a/src/test/run-pass/task-comm.rs b/src/test/run-pass/task-comm.rs index 04751e37..0a91b98a 100644 --- a/src/test/run-pass/task-comm.rs +++ b/src/test/run-pass/task-comm.rs @@ -1,7 +1,7 @@ // xfail-boot // xfail-stage0 -impure fn main() -> () { +fn main() -> () { test00(true); // test01(); test02(); @@ -11,7 +11,7 @@ impure fn main() -> () { test06(); } -impure fn test00_start(chan[int] ch, int message, int count) { +fn test00_start(chan[int] ch, int message, int count) { log "Starting test00_start"; let int i = 0; while (i < count) { @@ -22,7 +22,7 @@ impure fn test00_start(chan[int] ch, int message, int count) { log "Ending test00_start"; } -impure fn test00(bool is_multithreaded) { +fn test00(bool is_multithreaded) { let int number_of_tasks = 1; let int number_of_messages = 4; log "Creating tasks"; @@ -62,14 +62,14 @@ impure fn test00(bool is_multithreaded) { (number_of_tasks * number_of_tasks + number_of_tasks) / 2); } -impure fn test01() { +fn test01() { let port[int] p = port(); log "Reading from a port that is never written to."; let int value <- p; log value; } -impure fn test02() { +fn test02() { let port[int] p = port(); let chan[int] c = chan(p); log "Writing to a local task channel."; @@ -113,7 +113,7 @@ fn test04() { log "Finishing up."; } -impure fn test05_start(chan[int] ch) { +fn test05_start(chan[int] ch) { ch <| 10; ch <| 20; ch <| 30; @@ -121,7 +121,7 @@ impure fn test05_start(chan[int] ch) { ch <| 30; } -impure fn test05() { +fn test05() { let port[int] po = port(); let chan[int] ch = chan(po); spawn thread test05_start(ch); diff --git a/src/test/run-pass/vec-in-tup.rs b/src/test/run-pass/vec-in-tup.rs index 97eb222e..415554dd 100644 --- a/src/test/run-pass/vec-in-tup.rs +++ b/src/test/run-pass/vec-in-tup.rs @@ -1,4 +1,4 @@ -impure fn main() { +fn main() { let tup(mutable vec[int]) i = tup(mutable vec(1,2,3)); i._0 = vec(4,5,6); } diff --git a/src/test/run-pass/writealias.rs b/src/test/run-pass/writealias.rs index 551fb7d3..8bf8140f 100644 --- a/src/test/run-pass/writealias.rs +++ b/src/test/run-pass/writealias.rs @@ -2,11 +2,11 @@ type point = rec(int x, int y, mutable int z); -impure fn f(& mutable point p) { +fn f(& mutable point p) { p.z = 13; } -impure fn main() { +fn main() { let point x = rec(x=10, y=11, mutable z=12); f(x); check (x.z == 13); |