From 913c2273eba32c7a33e068a5ac68007d7f8419d1 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 11 Jun 2015 11:26:16 -0700 Subject: Add comment about stabilizing CString::from_ptr This naming needs to consider the raw vs ptr naming of Box/CStr/CString/slice/etc. --- src/liballoc/boxed.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/liballoc') diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 1a360ebc05c..1039756363e 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -124,6 +124,7 @@ impl Box { #[unstable(feature = "box_raw", reason = "may be renamed or moved out of Box scope")] #[inline] + // NB: may want to be called from_ptr, see comments on CStr::from_ptr pub unsafe fn from_raw(raw: *mut T) -> Self { mem::transmute(raw) } @@ -147,6 +148,7 @@ impl Box { /// ``` #[unstable(feature = "box_raw", reason = "may be renamed")] #[inline] + // NB: may want to be called into_ptr, see comments on CStr::from_ptr pub fn into_raw(b: Box) -> *mut T { unsafe { mem::transmute(b) } } -- cgit 1.4.1-3-g733a5