Skip to content

Commit

Permalink
Rollup merge of rust-lang#54064 - nagisa:tiny-typo, r=sfackler
Browse files Browse the repository at this point in the history
`&CStr`, not `CStr`, is the counterpart of `&str`
  • Loading branch information
kennytm authored Sep 12, 2018
2 parents 3c9e884 + 0ec351d commit de2c0f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libstd/ffi/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down Expand Up @@ -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
///
Expand Down Expand Up @@ -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.
///
Expand Down

0 comments on commit de2c0f9

Please sign in to comment.