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

@@ -39,17 +39,6 @@ pub mod libc_ {
}
}
pub mod rusti {
#[abi = "rust-intrinsic"]
pub extern "rust-intrinsic" {
fn addr_of<T>(&&val: T) -> *T;
}
}
/// Get an unsafe pointer to a value
#[inline(always)]
pub fn addr_of<T>(val: &T) -> *T { unsafe { rusti::addr_of(*val) } }
/// Calculate the offset from a pointer
#[inline(always)]
pub fn offset<T>(ptr: *T, count: uint) -> *T {