diff options
| author | bors <bors@rust-lang.org> | 2014-05-03 10:56:57 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-05-03 10:56:57 -0700 |
| commit | 0c691df8acaf10aa3721476e5d7fafcee11b0aaa (patch) | |
| tree | 7aca9144c64039fea0aff444e13870b4be40fae7 /src/libstd/task.rs | |
| parent | bca9647cd34c78a1c7c2409fbb2c31cb2c8194d7 (diff) | |
| parent | a5be12ce7e88c1d28de1c98215991127d1e765f0 (diff) | |
| download | rust-0c691df8acaf10aa3721476e5d7fafcee11b0aaa.tar.gz rust-0c691df8acaf10aa3721476e5d7fafcee11b0aaa.zip | |
auto merge of #13773 : brson/rust/boxxy, r=alexcrichton
`box` is the way you allocate in future-rust.
Diffstat (limited to 'src/libstd/task.rs')
| -rw-r--r-- | src/libstd/task.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/task.rs b/src/libstd/task.rs index f8b3d25033c..e9b01063f94 100644 --- a/src/libstd/task.rs +++ b/src/libstd/task.rs @@ -418,7 +418,7 @@ fn test_spawn_sched_childs_on_default_sched() { fn avoid_copying_the_body(spawnfn: |v: proc():Send|) { let (tx, rx) = channel::<uint>(); - let x = ~1; + let x = box 1; let x_in_parent = (&*x) as *int as uint; spawnfn(proc() { @@ -507,7 +507,7 @@ fn test_try_fail_message_owned_str() { #[test] fn test_try_fail_message_any() { match try(proc() { - fail!(~413u16 as ~Any:Send); + fail!(box 413u16 as ~Any:Send); }) { Err(e) => { type T = ~Any:Send; |
