Skip to content

Commit a6c3f6c

Browse files
committed
CStr: add some doc links
1 parent cdd7afe commit a6c3f6c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

library/core/src/ffi/c_str.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ use crate::str;
1313
/// array of bytes. It can be constructed safely from a <code>&[[u8]]</code>
1414
/// slice, or unsafely from a raw `*const c_char`. It can then be
1515
/// converted to a Rust <code>&[str]</code> by performing UTF-8 validation, or
16-
/// into an owned `CString`.
16+
/// into an owned [`CString`].
1717
///
18-
/// `&CStr` is to `CString` as <code>&[str]</code> is to `String`: the former
18+
/// `&CStr` is to [`CString`] as <code>&[str]</code> is to [`String`]: the former
1919
/// in each pair are borrowed references; the latter are owned
2020
/// strings.
2121
///
@@ -24,6 +24,9 @@ use crate::str;
2424
/// functions may leverage the unsafe [`CStr::from_ptr`] constructor to provide
2525
/// a safe interface to other consumers.
2626
///
27+
/// [`CString`]: ../../std/ffi/struct.CString.html
28+
/// [`String`]: ../../std/string/struct.String.html
29+
///
2730
/// # Examples
2831
///
2932
/// Inspecting a foreign C string:

0 commit comments

Comments
 (0)