diff options
| author | Cristian Kubis <cristian.kubis@tsunix.de> | 2015-10-01 12:43:00 +0200 |
|---|---|---|
| committer | Cristian Kubis <cristian.kubis@tsunix.de> | 2015-10-01 12:43:00 +0200 |
| commit | 566dc9cf9377457e4d099d3306c30014ad582963 (patch) | |
| tree | f2ab0dfec96e211a3cebe98d21c7e9ebfc52927f /src/libstd/ffi | |
| parent | e5ba127734f7754a326d3197229e94c8a5a3be23 (diff) | |
doc: fixed swapped docs for from_ptr and from_raw
Diffstat (limited to 'src/libstd/ffi')
| -rw-r--r-- | src/libstd/ffi/c_str.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index 7c9c2066ae9..70e9eca31e5 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -230,11 +230,11 @@ impl CString { /// 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 + /// `from_ptr` 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. + /// Failure to call `from_ptr` will lead to a memory leak. #[unstable(feature = "cstr_memory2", reason = "recently added", issue = "27769")] #[deprecated(since = "1.4.0", reason = "renamed to into_raw")] @@ -245,11 +245,11 @@ impl CString { /// Transfers ownership of the string to a C caller. /// /// The pointer must be returned to Rust and reconstituted using - /// `from_ptr` to be properly deallocated. Specifically, one + /// `from_raw` to be properly deallocated. Specifically, one /// should *not* use the standard C `free` function to deallocate /// this string. /// - /// Failure to call `from_ptr` will lead to a memory leak. + /// 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 libc::c_char { Box::into_raw(self.inner) as *mut libc::c_char |
