diff options
| author | Nikolai Vazquez <nvazquez1297@gmail.com> | 2017-10-06 16:39:01 -0400 |
|---|---|---|
| committer | Nikolai Vazquez <nvazquez1297@gmail.com> | 2017-10-06 16:39:01 -0400 |
| commit | 904133e1e28b690e2bbd101b719509aa897539a0 (patch) | |
| tree | 0980e4bd32d303ac0bdd600f43a8fc6e4656f575 /src/liballoc | |
| parent | 8f167b34b734bcd2fb0d8f4acb141c46316cd82d (diff) | |
| download | rust-904133e1e28b690e2bbd101b719509aa897539a0.tar.gz rust-904133e1e28b690e2bbd101b719509aa897539a0.zip | |
Revert to using mem::transmute in Box::into_unique
Seems to cause this error: "Cannot handle boxed::Box<[u8]> represented as TyLayout".
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/boxed.rs | 4 |
1 files changed, 1 insertions, 3 deletions
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<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) } } } |
