Skip to content

Commit

Permalink
Rollup merge of rust-lang#64326 - hman523:master, r=joshtriplett
Browse files Browse the repository at this point in the history
Fixed documentation within c_str::from_ptr

Fixed the documentation issue mentioned in rust-lang#63590
  • Loading branch information
Centril authored Sep 11, 2019
2 parents 751aec8 + 9b1456e commit 57df63c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/libstd/ffi/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -935,8 +935,10 @@ impl CStr {
/// Wraps a raw C string with a safe C string wrapper.
///
/// This function will wrap the provided `ptr` with a `CStr` wrapper, which
/// allows inspection and interoperation of non-owned C strings. This method
/// is unsafe for a number of reasons:
/// allows inspection and interoperation of non-owned C strings. The total
/// size of the raw C string must be smaller than `isize::MAX` **bytes**
/// in memory due to calling the `slice::from_raw_parts` function.
/// This method is unsafe for a number of reasons:
///
/// * There is no guarantee to the validity of `ptr`.
/// * The returned lifetime is not guaranteed to be the actual lifetime of
Expand Down

0 comments on commit 57df63c

Please sign in to comment.