Skip to content

Commit 452b71a

Browse files
committed
Revert to using mem::transmute in Box::from_raw
Same reasons as commit 904133e.
1 parent 904133e commit 452b71a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/liballoc/boxed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ impl<T: ?Sized> Box<T> {
269269
#[stable(feature = "box_raw", since = "1.4.0")]
270270
#[inline]
271271
pub unsafe fn from_raw(raw: *mut T) -> Self {
272-
Box(Unique::new_unchecked(raw))
272+
mem::transmute(raw)
273273
}
274274

275275
/// Consumes the `Box`, returning the wrapped raw pointer.

0 commit comments

Comments
 (0)