diff options
| -rw-r--r-- | src/liballoc/boxed.rs | 2 |
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. |
