about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-10-27 09:11:07 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-10-27 15:12:48 -0700
commita33d7617c5b5d18ff495fe6aa9108aa13939a114 (patch)
tree175d19a1340e0f244e9c30e7f6a64c6c3d8b89ac /src/libstd
parent40811f84ef3f04230e29ec4feb4e99a5b79480cb (diff)
downloadrust-a33d7617c5b5d18ff495fe6aa9108aa13939a114.tar.gz
rust-a33d7617c5b5d18ff495fe6aa9108aa13939a114.zip
Test fixes and rebase conflicts from rollup
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/ascii.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/ascii.rs b/src/libstd/ascii.rs
index f7a84fc3478..c2e88bfdbcf 100644
--- a/src/libstd/ascii.rs
+++ b/src/libstd/ascii.rs
@@ -259,9 +259,9 @@ impl OwnedAsciiCast for Vec<u8> {
 
     #[inline]
     unsafe fn into_ascii_nocheck(self) -> Vec<Ascii> {
-        let v = Vec::from_raw_parts(self.len(),
-                                    self.capacity(),
-                                    mem::transmute(self.as_ptr()));
+        let v = Vec::from_raw_parts(self.as_ptr() as *mut Ascii,
+                                    self.len(),
+                                    self.capacity());
 
         // We forget `self` to avoid freeing it at the end of the scope
         // Otherwise, the returned `Vec` would point to freed memory
@@ -345,9 +345,9 @@ pub trait IntoBytes {
 impl IntoBytes for Vec<Ascii> {
     fn into_bytes(self) -> Vec<u8> {
         unsafe {
-            let v = Vec::from_raw_parts(self.len(),
-                                        self.capacity(),
-                                        mem::transmute(self.as_ptr()));
+            let v = Vec::from_raw_parts(self.as_ptr() as *mut u8,
+                                        self.len(),
+                                        self.capacity());
 
             // We forget `self` to avoid freeing it at the end of the scope
             // Otherwise, the returned `Vec` would point to freed memory