From da50f7c288b8e6856b42fd923f3479af1c94b3bf Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 2 Dec 2015 17:07:29 -0800 Subject: std: Remove deprecated functionality from 1.5 This is a standard "clean out libstd" commit which removes all 1.5-and-before deprecated functionality as it's now all been deprecated for at least one entire cycle. --- src/libstd/ffi/c_str.rs | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'src/libstd/ffi') diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index 40fb450bea1..318ff410cba 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -206,18 +206,6 @@ impl CString { CString { inner: v.into_boxed_slice() } } - /// Retakes ownership of a CString that was transferred to C. - /// - /// The only appropriate argument is a pointer obtained by calling - /// `into_raw`. The length of the string will be recalculated - /// using the pointer. - #[unstable(feature = "cstr_memory2", reason = "recently added", - issue = "27769")] - #[rustc_deprecated(since = "1.4.0", reason = "renamed to from_raw")] - pub unsafe fn from_ptr(ptr: *const c_char) -> CString { - CString::from_raw(ptr as *mut _) - } - /// Retakes ownership of a CString that was transferred to C. /// /// The only appropriate argument is a pointer obtained by calling @@ -230,21 +218,6 @@ impl CString { CString { inner: mem::transmute(slice) } } - /// Transfers ownership of the string to a C caller. - /// - /// The pointer must be returned to Rust and reconstituted using - /// `from_raw` to be properly deallocated. Specifically, one - /// should *not* use the standard C `free` function to deallocate - /// this string. - /// - /// Failure to call `from_raw` will lead to a memory leak. - #[unstable(feature = "cstr_memory2", reason = "recently added", - issue = "27769")] - #[rustc_deprecated(since = "1.4.0", reason = "renamed to into_raw")] - pub fn into_ptr(self) -> *const c_char { - self.into_raw() as *const _ - } - /// Transfers ownership of the string to a C caller. /// /// The pointer must be returned to Rust and reconstituted using -- cgit 1.4.1-3-g733a5