diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-09-01 16:39:51 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-09-01 16:53:53 -0700 |
| commit | d8a833dccd5dc6e7c2b0694e22334724fe32e91d (patch) | |
| tree | d15acceb69e7efc39ebc7843fe62d1aa961844cb /src | |
| parent | e412652f0027dd0da270f802d894d910736a9f23 (diff) | |
| download | rust-d8a833dccd5dc6e7c2b0694e22334724fe32e91d.tar.gz rust-d8a833dccd5dc6e7c2b0694e22334724fe32e91d.zip | |
Convert some comm tests to istrs. Issue #855
These spawn thunks need to take move-mode strings to be correct
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/run-pass/child-outlives-parent.rs | 4 | ||||
| -rw-r--r-- | src/test/run-pass/spawn-fn.rs | 8 | ||||
| -rw-r--r-- | src/test/run-pass/task-life-0.rs | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/test/run-pass/child-outlives-parent.rs b/src/test/run-pass/child-outlives-parent.rs index 12aec5b8ad8..c902809e447 100644 --- a/src/test/run-pass/child-outlives-parent.rs +++ b/src/test/run-pass/child-outlives-parent.rs @@ -3,6 +3,6 @@ use std; import std::task; -fn child2(s: str) { } +fn child2(s: -istr) { } -fn main() { let x = task::spawn(bind child2("hi")); } +fn main() { let x = task::spawn(bind child2(~"hi")); } diff --git a/src/test/run-pass/spawn-fn.rs b/src/test/run-pass/spawn-fn.rs index fdaa6703c17..bfaba60bcd1 100644 --- a/src/test/run-pass/spawn-fn.rs +++ b/src/test/run-pass/spawn-fn.rs @@ -4,12 +4,12 @@ use std; import std::task::yield; import std::task; -fn x(s: str, n: int) { log s; log n; } +fn x(s: -istr, n: int) { log s; log n; } fn main() { - task::spawn(bind x("hello from first spawned fn", 65)); - task::spawn(bind x("hello from second spawned fn", 66)); - task::spawn(bind x("hello from third spawned fn", 67)); + task::spawn(bind x(~"hello from first spawned fn", 65)); + task::spawn(bind x(~"hello from second spawned fn", 66)); + task::spawn(bind x(~"hello from third spawned fn", 67)); let i: int = 30; while i > 0 { i = i - 1; log "parent sleeping"; yield(); } } diff --git a/src/test/run-pass/task-life-0.rs b/src/test/run-pass/task-life-0.rs index 1d40010d296..b8c78ecd12b 100644 --- a/src/test/run-pass/task-life-0.rs +++ b/src/test/run-pass/task-life-0.rs @@ -1,7 +1,7 @@ use std; import std::task; -fn main() { task::spawn(bind child("Hello")); } +fn main() { task::spawn(bind child(~"Hello")); } -fn child(s: str) { +fn child(s: -str) { } |
