mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
replaced *_ptr with *_raw methods in docs
This commit is contained in:
parent
566dc9cf93
commit
25c21342c6
@ -206,7 +206,7 @@ impl CString {
|
|||||||
/// Retakes ownership of a CString that was transferred to C.
|
/// Retakes ownership of a CString that was transferred to C.
|
||||||
///
|
///
|
||||||
/// The only appropriate argument is a pointer obtained by calling
|
/// The only appropriate argument is a pointer obtained by calling
|
||||||
/// `into_ptr`. The length of the string will be recalculated
|
/// `into_raw`. The length of the string will be recalculated
|
||||||
/// using the pointer.
|
/// using the pointer.
|
||||||
#[unstable(feature = "cstr_memory2", reason = "recently added",
|
#[unstable(feature = "cstr_memory2", reason = "recently added",
|
||||||
issue = "27769")]
|
issue = "27769")]
|
||||||
@ -230,11 +230,11 @@ impl CString {
|
|||||||
/// Transfers ownership of the string to a C caller.
|
/// Transfers ownership of the string to a C caller.
|
||||||
///
|
///
|
||||||
/// The pointer must be returned to Rust and reconstituted using
|
/// 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
|
/// should *not* use the standard C `free` function to deallocate
|
||||||
/// this string.
|
/// this string.
|
||||||
///
|
///
|
||||||
/// Failure to call `from_ptr` will lead to a memory leak.
|
/// Failure to call `from_raw` will lead to a memory leak.
|
||||||
#[unstable(feature = "cstr_memory2", reason = "recently added",
|
#[unstable(feature = "cstr_memory2", reason = "recently added",
|
||||||
issue = "27769")]
|
issue = "27769")]
|
||||||
#[deprecated(since = "1.4.0", reason = "renamed to into_raw")]
|
#[deprecated(since = "1.4.0", reason = "renamed to into_raw")]
|
||||||
|
Loading…
Reference in New Issue
Block a user