Skip to content

Commit 0ec351d

Browse files
committed
&CStr, not CStr, is the counterpart of &str
1 parent 06da917 commit 0ec351d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libstd/ffi/c_str.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use sys;
3333
/// type is a static guarantee that the underlying bytes contain no interior 0
3434
/// bytes ("nul characters") and that the final byte is 0 ("nul terminator").
3535
///
36-
/// `CString` is to [`CStr`] as [`String`] is to [`&str`]: the former
36+
/// `CString` is to [`&CStr`] as [`String`] is to [`&str`]: the former
3737
/// in each pair are owned strings; the latter are borrowed
3838
/// references.
3939
///
@@ -88,6 +88,7 @@ use sys;
8888
/// [slice.len]: ../primitive.slice.html#method.len
8989
/// [`Deref`]: ../ops/trait.Deref.html
9090
/// [`CStr`]: struct.CStr.html
91+
/// [`&CStr`]: struct.CStr.html
9192
///
9293
/// # Examples
9394
///
@@ -137,7 +138,7 @@ pub struct CString {
137138
/// converted to a Rust [`&str`] by performing UTF-8 validation, or
138139
/// into an owned [`CString`].
139140
///
140-
/// `CStr` is to [`CString`] as [`&str`] is to [`String`]: the former
141+
/// `&CStr` is to [`CString`] as [`&str`] is to [`String`]: the former
141142
/// in each pair are borrowed references; the latter are owned
142143
/// strings.
143144
///

0 commit comments

Comments
 (0)