Skip to content

Commit

Permalink
Revert to using mem::transmute in Box::into_unique
Browse files Browse the repository at this point in the history
Seems to cause this error: "Cannot handle boxed::Box<[u8]> represented
as TyLayout".
  • Loading branch information
nvzqz committed Oct 6, 2017
1 parent 8f167b3 commit 904133e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/liballoc/boxed.rs
Expand Up @@ -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) }
}
}

Expand Down

0 comments on commit 904133e

Please sign in to comment.