diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index d4b7094d6fb..56146a9a5fd 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -809,7 +809,7 @@ pub fn drop(_x: T) { } #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub unsafe fn transmute_copy(src: &T) -> U { - ptr::read(src as *const T as *const U) + ptr::read_unaligned(src as *const T as *const U) } /// Opaque type representing the discriminant of an enum.