about summary refs log tree commit diff
path: root/src/libstd/cast.rs
diff options
context:
space:
mode:
authorJames Miller <james@aatch.net>2013-06-20 17:15:50 +1200
committerJames Miller <bladeon@gmail.com>2013-06-21 02:43:02 +1200
commit3bc4d1a1206ad5f4bb31475e17fc18ecf855ed8e (patch)
tree3cec5e46a4f4a7b7b689f75b56e18ebc3f966bb4 /src/libstd/cast.rs
parent6759ce4fd2083595193c93c3fd72383d24a73a5e (diff)
downloadrust-3bc4d1a1206ad5f4bb31475e17fc18ecf855ed8e.tar.gz
rust-3bc4d1a1206ad5f4bb31475e17fc18ecf855ed8e.zip
Remove all #[cfg(stage0)]-protected code
New snapshot means this can all go. Also removes places that have
comments that say they are workarounds for stage0 errors.
Diffstat (limited to 'src/libstd/cast.rs')
-rw-r--r--src/libstd/cast.rs17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/libstd/cast.rs b/src/libstd/cast.rs
index 900cc600923..30b6b030dba 100644
--- a/src/libstd/cast.rs
+++ b/src/libstd/cast.rs
@@ -14,21 +14,8 @@ use sys;
 use unstable::intrinsics;
 
 /// Casts the value at `src` to U. The two types must have the same length.
-#[cfg(stage0)]
-pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
-    let mut dest: U = intrinsics::uninit();
-    {
-        let dest_ptr: *mut u8 = transmute(&mut dest);
-        let src_ptr: *u8 = transmute(src);
-        intrinsics::memmove64(dest_ptr,
-                              src_ptr,
-                              sys::size_of::<U>() as u64);
-    }
-    dest
-}
-
 /// Casts the value at `src` to U. The two types must have the same length.
-#[cfg(target_word_size = "32", not(stage0))]
+#[cfg(target_word_size = "32")]
 #[inline]
 pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
     let mut dest: U = intrinsics::uninit();
@@ -39,7 +26,7 @@ pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
 }
 
 /// Casts the value at `src` to U. The two types must have the same length.
-#[cfg(target_word_size = "64", not(stage0))]
+#[cfg(target_word_size = "64")]
 #[inline]
 pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
     let mut dest: U = intrinsics::uninit();