summary refs log tree commit diff
path: root/src/libcore/ptr.rs
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2012-06-07 07:18:24 -0700
committerNiko Matsakis <niko@alum.mit.edu>2012-06-07 07:18:29 -0700
commit3cbd1e221ec9625e7879adb3fe406efd082cb60d (patch)
treec4db8c5226ea971c68a505c4c03446f169905014 /src/libcore/ptr.rs
parent5f4837ad6ac5ceb7277796a817db35b137da4813 (diff)
downloadrust-3cbd1e221ec9625e7879adb3fe406efd082cb60d.tar.gz
rust-3cbd1e221ec9625e7879adb3fe406efd082cb60d.zip
mark addr_or and friends pure
Diffstat (limited to 'src/libcore/ptr.rs')
-rw-r--r--src/libcore/ptr.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index b90928727b1..2ce5550d951 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -32,11 +32,11 @@ native mod rusti {
 
 #[doc = "Get an unsafe pointer to a value"]
 #[inline(always)]
-fn addr_of<T>(val: T) -> *T { rusti::addr_of(val) }
+pure fn addr_of<T>(val: T) -> *T { unchecked { rusti::addr_of(val) } }
 
 #[doc = "Get an unsafe mut pointer to a value"]
 #[inline(always)]
-fn mut_addr_of<T>(val: T) -> *mut T unsafe {
+pure fn mut_addr_of<T>(val: T) -> *mut T unsafe {
     unsafe::reinterpret_cast(rusti::addr_of(val))
 }