about summary refs log tree commit diff
path: root/src/libcore/mem.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-06-25 12:47:34 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-28 11:53:58 -0700
commit0dfc90ab15475aa64bea393671463a8e9784ae3f (patch)
tree41c9c856c504f33552abe4a0eca9fbdc3d5d215d /src/libcore/mem.rs
parent2823be08b7d1b9106cbbd454437384c093c5a5fa (diff)
Rename all raw pointers as necessary
Diffstat (limited to 'src/libcore/mem.rs')
-rw-r--r--src/libcore/mem.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs
index a2a3e09a93c..d1e2084243d 100644
--- a/src/libcore/mem.rs
+++ b/src/libcore/mem.rs
@@ -363,7 +363,7 @@ pub unsafe fn forget<T>(thing: T) { intrinsics::forget(thing) }
 #[inline]
 #[stable]
 pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
-    ptr::read(src as *T as *U)
+    ptr::read(src as *const T as *const U)
 }
 
 /// Transforms lifetime of the second pointer to match the first.
@@ -407,14 +407,14 @@ mod tests {
     #[cfg(target_arch = "mipsel")]
     fn size_of_32() {
         assert_eq!(size_of::<uint>(), 4u);
-        assert_eq!(size_of::<*uint>(), 4u);
+        assert_eq!(size_of::<*const uint>(), 4u);
     }
 
     #[test]
     #[cfg(target_arch = "x86_64")]
     fn size_of_64() {
         assert_eq!(size_of::<uint>(), 8u);
-        assert_eq!(size_of::<*uint>(), 8u);
+        assert_eq!(size_of::<*const uint>(), 8u);
     }
 
     #[test]
@@ -439,14 +439,14 @@ mod tests {
     #[cfg(target_arch = "mipsel")]
     fn align_of_32() {
         assert_eq!(align_of::<uint>(), 4u);
-        assert_eq!(align_of::<*uint>(), 4u);
+        assert_eq!(align_of::<*const uint>(), 4u);
     }
 
     #[test]
     #[cfg(target_arch = "x86_64")]
     fn align_of_64() {
         assert_eq!(align_of::<uint>(), 8u);
-        assert_eq!(align_of::<*uint>(), 8u);
+        assert_eq!(align_of::<*const uint>(), 8u);
     }
 
     #[test]
@@ -486,7 +486,7 @@ mod tests {
         let a = box 100i as Box<Foo>;
         unsafe {
             let x: raw::TraitObject = transmute(a);
-            assert!(*(x.data as *int) == 100);
+            assert!(*(x.data as *const int) == 100);
             let _x: Box<Foo> = transmute(x);
         }