From 904133e1e28b690e2bbd101b719509aa897539a0 Mon Sep 17 00:00:00 2001 From: Nikolai Vazquez Date: Fri, 6 Oct 2017 16:39:01 -0400 Subject: Revert to using mem::transmute in Box::into_unique Seems to cause this error: "Cannot handle boxed::Box<[u8]> represented as TyLayout". --- src/liballoc/boxed.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/liballoc') diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 512c7194fe3..6b92da11079 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -326,9 +326,7 @@ impl Box { issue = "27730")] #[inline] pub fn into_unique(b: Box) -> Unique { - let u = b.0; - mem::forget(b); - u + unsafe { mem::transmute(b) } } } -- cgit 1.4.1-3-g733a5