diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-12-02 17:07:29 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-12-10 11:47:55 -0800 |
| commit | da50f7c288b8e6856b42fd923f3479af1c94b3bf (patch) | |
| tree | 8f1aa965704dc20ec8140fd7b7649e050ec9f0ee /src/libstd/ffi | |
| parent | 08a5b112ed7af90e31a355e409f637997e458fbc (diff) | |
| download | rust-da50f7c288b8e6856b42fd923f3479af1c94b3bf.tar.gz rust-da50f7c288b8e6856b42fd923f3479af1c94b3bf.zip | |
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.
Diffstat (limited to 'src/libstd/ffi')
| -rw-r--r-- | src/libstd/ffi/c_str.rs | 27 |
1 files changed, 0 insertions, 27 deletions
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 @@ -211,18 +211,6 @@ impl CString { /// 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 - /// `into_raw`. The length of the string will be recalculated - /// using the pointer. #[stable(feature = "cstr_memory", since = "1.4.0")] pub unsafe fn from_raw(ptr: *mut c_char) -> CString { let len = libc::strlen(ptr) + 1; // Including the NUL byte @@ -238,21 +226,6 @@ impl CString { /// 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 - /// `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. #[stable(feature = "cstr_memory", since = "1.4.0")] pub fn into_raw(self) -> *mut c_char { Box::into_raw(self.inner) as *mut c_char |
