We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f4837a commit 3cbd1e2Copy full SHA for 3cbd1e2
src/libcore/ptr.rs
@@ -32,11 +32,11 @@ native mod rusti {
32
33
#[doc = "Get an unsafe pointer to a value"]
34
#[inline(always)]
35
-fn addr_of<T>(val: T) -> *T { rusti::addr_of(val) }
+pure fn addr_of<T>(val: T) -> *T { unchecked { rusti::addr_of(val) } }
36
37
#[doc = "Get an unsafe mut pointer to a value"]
38
39
-fn mut_addr_of<T>(val: T) -> *mut T unsafe {
+pure fn mut_addr_of<T>(val: T) -> *mut T unsafe {
40
unsafe::reinterpret_cast(rusti::addr_of(val))
41
}
42
0 commit comments