librustc: Remove ptr::addr_of.

This commit is contained in:
Patrick Walton
2013-04-22 14:27:30 -07:00
parent 58791c2fd8
commit b0522a497c
61 changed files with 276 additions and 300 deletions

View File

@@ -1028,10 +1028,10 @@ fn avoid_copying_the_body(spawnfn: &fn(v: ~fn())) {
let (p, ch) = stream::<uint>();
let x = ~1;
let x_in_parent = ptr::addr_of(&(*x)) as uint;
let x_in_parent = ptr::to_unsafe_ptr(&*x) as uint;
do spawnfn || {
let x_in_child = ptr::addr_of(&(*x)) as uint;
let x_in_child = ptr::to_unsafe_ptr(&*x) as uint;
ch.send(x_in_child);
}