Revert to using mem::transmute in Box::into_unique

Seems to cause this error: "Cannot handle boxed::Box<[u8]> represented
as TyLayout".
This commit is contained in:
Nikolai Vazquez 2017-10-06 16:39:01 -04:00
parent 8f167b34b7
commit 904133e1e2

View File

@ -326,9 +326,7 @@ impl<T: ?Sized> Box<T> {
issue = "27730")]
#[inline]
pub fn into_unique(b: Box<T>) -> Unique<T> {
let u = b.0;
mem::forget(b);
u
unsafe { mem::transmute(b) }
}
}