libcore: Remove ptr::mut_addr_of since &mut is coerced to *mut

This commit is contained in:
Luqman Aden 2013-02-14 19:00:04 -05:00 committed by Luqman Aden
parent af2f0ef088
commit cc89029942
7 changed files with 17 additions and 27 deletions

View file

@ -16,8 +16,8 @@ fn main() {
}
unsafe {
let a = 0;
let v = ptr::mut_addr_of(&a);
let mut a = 0;
let v = &mut a;
f(v);
}
}

View file

@ -13,8 +13,8 @@
extern mod std;
fn main() {
let a = ~[0];
let v: *mut ~[int] = ptr::mut_addr_of(&a);
let mut a = ~[0];
let v: *mut ~[int] = &mut a;
fn f(&&v: *mut ~[const int]) {
unsafe {

View file

@ -39,6 +39,6 @@ fn r(recursed: *mut bool) -> r {
fn main() {
let mut recursed = false;
let _r = r(ptr::mut_addr_of(&recursed));
let _r = r(&mut recursed);
recurse();
}