diff options
| author | Nikolai Vazquez <nvazquez1297@gmail.com> | 2017-10-06 17:01:50 -0400 |
|---|---|---|
| committer | Nikolai Vazquez <nvazquez1297@gmail.com> | 2017-10-06 17:01:50 -0400 |
| commit | 452b71a07be066432d93a93c1f9e7f10e18d7c96 (patch) | |
| tree | 4f98cc79df7dfd6eeb73dcb60cf64c408953e071 /src/liballoc/boxed.rs | |
| parent | 904133e1e28b690e2bbd101b719509aa897539a0 (diff) | |
| download | rust-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.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. |
