about summary refs log tree commit diff
path: root/src/libcore/ptr.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-09-02 16:03:37 -0700
committerBrian Anderson <banderson@mozilla.com>2012-09-02 16:03:37 -0700
commita80b7dc709ff03e569ef22e322925c93d3a415f5 (patch)
treed980c133ae6e67d5c43026c5f6f957962bcba500 /src/libcore/ptr.rs
parent512a769f6fd9b9427d5e4aff33bd5bb3b0667af2 (diff)
downloadrust-a80b7dc709ff03e569ef22e322925c93d3a415f5.tar.gz
rust-a80b7dc709ff03e569ef22e322925c93d3a415f5.zip
Fix use of reinterpret_cast in to_mut_unsafe_ptr
Diffstat (limited to 'src/libcore/ptr.rs')
-rw-r--r--src/libcore/ptr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index 0117db25c58..68966d21984 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -146,7 +146,7 @@ fn to_unsafe_ptr<T>(thing: &T) -> *T unsafe {
 */
 #[inline(always)]
 fn to_mut_unsafe_ptr<T>(thing: &mut T) -> *mut T unsafe {
-    unsafe::reinterpret_cast(thing)
+    unsafe::reinterpret_cast(&thing)
 }
 
 /**