diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-09-28 21:51:14 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-09-28 22:19:01 -0700 |
| commit | 3639d38d5c982193eab8304f2adfe0fcd2dd84bd (patch) | |
| tree | 84d883ad752071f14a4300e5f59a9a4944651e0b /src/libcore/task.rs | |
| parent | f1014c43fd4e22fa1a8190e642e05dc6891d6eaa (diff) | |
| download | rust-3639d38d5c982193eab8304f2adfe0fcd2dd84bd.tar.gz rust-3639d38d5c982193eab8304f2adfe0fcd2dd84bd.zip | |
Add a demoded version of ptr::addr_of
Currently, the new version is ptr::p2::addr_of and the old one is ptr::addr_of. This is kind of cheesy, but I need a snapshot before I can ditch the old version, since the pipe compiler generates calls to addr_of. core is converted over to use the new version, std is not.
Diffstat (limited to 'src/libcore/task.rs')
| -rw-r--r-- | src/libcore/task.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/task.rs b/src/libcore/task.rs index 9e2949c37ef..d7e8416e9f7 100644 --- a/src/libcore/task.rs +++ b/src/libcore/task.rs @@ -1175,10 +1175,10 @@ fn avoid_copying_the_body(spawnfn: fn(+v: fn~())) { let ch = comm::Chan(p); let x = ~1; - let x_in_parent = ptr::addr_of(*x) as uint; + let x_in_parent = ptr::p2::addr_of(&(*x)) as uint; do spawnfn { - let x_in_child = ptr::addr_of(*x) as uint; + let x_in_child = ptr::p2::addr_of(&(*x)) as uint; comm::send(ch, x_in_child); } |
