about summary refs log tree commit diff
path: root/src/liballoc/boxed.rs
diff options
context:
space:
mode:
authorNikolai Vazquez <nvazquez1297@gmail.com>2017-10-06 17:01:50 -0400
committerNikolai Vazquez <nvazquez1297@gmail.com>2017-10-06 17:01:50 -0400
commit452b71a07be066432d93a93c1f9e7f10e18d7c96 (patch)
tree4f98cc79df7dfd6eeb73dcb60cf64c408953e071 /src/liballoc/boxed.rs
parent904133e1e28b690e2bbd101b719509aa897539a0 (diff)
downloadrust-452b71a07be066432d93a93c1f9e7f10e18d7c96.tar.gz
rust-452b71a07be066432d93a93c1f9e7f10e18d7c96.zip
Revert to using mem::transmute in Box::from_raw
Same reasons as commit 904133e1e28b690e2bbd101b719509aa897539a0.
Diffstat (limited to 'src/liballoc/boxed.rs')
-rw-r--r--src/liballoc/boxed.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index 6b92da11079..2e77b1b390c 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -269,7 +269,7 @@ impl<T: ?Sized> Box<T> {
     #[stable(feature = "box_raw", since = "1.4.0")]
     #[inline]
     pub unsafe fn from_raw(raw: *mut T) -> Self {
-        Box(Unique::new_unchecked(raw))
+        mem::transmute(raw)
     }
 
     /// Consumes the `Box`, returning the wrapped raw pointer.