about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-05-18 19:51:26 -0700
committerbors <bors@rust-lang.org>2014-05-18 19:51:26 -0700
commit4b81b6d5f417fe486c13ef9d5c87f77874e54ded (patch)
treeb5109b72f2a445a7b125a98f78b86a17a6b17058 /src/libcore
parent50b26df59ef848756645157cb6cf17f1e6cff1dc (diff)
parent9a8ef9197bc5d44e783965052da33e36a88527bb (diff)
downloadrust-4b81b6d5f417fe486c13ef9d5c87f77874e54ded.tar.gz
rust-4b81b6d5f417fe486c13ef9d5c87f77874e54ded.zip
auto merge of #14276 : aochagavia/rust/pr, r=alexcrichton
Diffstat (limited to 'src/libcore')
-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 acdf0bf0658..870fa0ec53f 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -359,7 +359,7 @@ impl<T> RawPtr<T> for *T {
         if self.is_null() {
             None
         } else {
-            Some(mem::transmute(*self))
+            Some(&**self)
         }
     }
 }
@@ -384,7 +384,7 @@ impl<T> RawPtr<T> for *mut T {
         if self.is_null() {
             None
         } else {
-            Some(mem::transmute(*self))
+            Some(&**self)
         }
     }
 }