diff options
| author | kennytm <kennytm@gmail.com> | 2018-09-12 12:17:29 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-12 12:17:29 +0800 |
| commit | de2c0f95e85d5f5140821805dfa76ec4e9867f50 (patch) | |
| tree | 653dd8eb3ac20ae561aa4861bc3bdc01cff78172 /src/libstd | |
| parent | 3c9e884dd3bf93b1516d3b5858072b7659c4cfba (diff) | |
| parent | 0ec351d528f95298afc399a3ac65f794394d6c58 (diff) | |
| download | rust-de2c0f95e85d5f5140821805dfa76ec4e9867f50.tar.gz rust-de2c0f95e85d5f5140821805dfa76ec4e9867f50.zip | |
Rollup merge of #54064 - nagisa:tiny-typo, r=sfackler
`&CStr`, not `CStr`, is the counterpart of `&str`
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/ffi/c_str.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index 2b87094926c..372f3e83e3d 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -33,7 +33,7 @@ use sys; /// type is a static guarantee that the underlying bytes contain no interior 0 /// bytes ("nul characters") and that the final byte is 0 ("nul terminator"). /// -/// `CString` is to [`CStr`] as [`String`] is to [`&str`]: the former +/// `CString` is to [`&CStr`] as [`String`] is to [`&str`]: the former /// in each pair are owned strings; the latter are borrowed /// references. /// @@ -88,6 +88,7 @@ use sys; /// [slice.len]: ../primitive.slice.html#method.len /// [`Deref`]: ../ops/trait.Deref.html /// [`CStr`]: struct.CStr.html +/// [`&CStr`]: struct.CStr.html /// /// # Examples /// @@ -137,7 +138,7 @@ pub struct CString { /// converted to a Rust [`&str`] by performing UTF-8 validation, or /// into an owned [`CString`]. /// -/// `CStr` is to [`CString`] as [`&str`] is to [`String`]: the former +/// `&CStr` is to [`CString`] as [`&str`] is to [`String`]: the former /// in each pair are borrowed references; the latter are owned /// strings. /// |
