diff options
| author | hman523 <shbarbella@gmail.com> | 2019-09-09 18:50:11 -0500 |
|---|---|---|
| committer | hman523 <shbarbella@gmail.com> | 2019-09-09 18:50:11 -0500 |
| commit | bdfab2049ce6bf67cb8557017d148960c534eb61 (patch) | |
| tree | c7ad7d6f01fa730eed0a778badcdbaa49f80b4bf /src/libstd | |
| parent | 0b36e9dea3f2ff25b1d0df2669836c33cce89ae5 (diff) | |
| download | rust-bdfab2049ce6bf67cb8557017d148960c534eb61.tar.gz rust-bdfab2049ce6bf67cb8557017d148960c534eb61.zip | |
Fixed documentation within c_str::from_ptr
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/ffi/c_str.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index 65f4e0cafe0..29d86e7146e 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -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 |
