Skip to content

Commit

Permalink
boxed: mark from_raw and into_raw functions inline
Browse files Browse the repository at this point in the history
  • Loading branch information
stepancheg committed Feb 22, 2015
1 parent 852eadc commit 554022e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/liballoc/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ impl<T : ?Sized> Box<T> {
/// function is called twice on the same raw pointer.
#[unstable(feature = "alloc",
reason = "may be renamed or moved out of Box scope")]
#[inline]
pub unsafe fn from_raw(raw: *mut T) -> Self {
mem::transmute(raw)
}
Expand Down Expand Up @@ -141,6 +142,7 @@ impl<T : ?Sized> Box<T> {
/// ```
#[unstable(feature = "alloc",
reason = "may be renamed")]
#[inline]
pub unsafe fn into_raw<T : ?Sized>(b: Box<T>) -> *mut T {
mem::transmute(b)
}
Expand Down

0 comments on commit 554022e

Please sign in to comment.