diff options
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/error.rs | 4 | ||||
| -rw-r--r-- | library/std/src/ffi/c_str.rs | 7 | ||||
| -rw-r--r-- | library/std/src/io/mod.rs | 2 | ||||
| -rw-r--r-- | library/std/src/lib.rs | 1 |
4 files changed, 10 insertions, 4 deletions
diff --git a/library/std/src/error.rs b/library/std/src/error.rs index 1b7681bd4bb..84e686c2fef 100644 --- a/library/std/src/error.rs +++ b/library/std/src/error.rs @@ -296,6 +296,8 @@ impl From<String> for Box<dyn Error> { impl<'a> From<&str> for Box<dyn Error + Send + Sync + 'a> { /// Converts a [`str`] into a box of dyn [`Error`] + [`Send`] + [`Sync`]. /// + /// [`str`]: prim@str + /// /// # Examples /// /// ``` @@ -317,6 +319,8 @@ impl<'a> From<&str> for Box<dyn Error + Send + Sync + 'a> { impl From<&str> for Box<dyn Error> { /// Converts a [`str`] into a box of dyn [`Error`]. /// + /// [`str`]: prim@str + /// /// # Examples /// /// ``` diff --git a/library/std/src/ffi/c_str.rs b/library/std/src/ffi/c_str.rs index 11b3f22503e..717967fb768 100644 --- a/library/std/src/ffi/c_str.rs +++ b/library/std/src/ffi/c_str.rs @@ -69,7 +69,7 @@ use crate::sys; /// extern functions. See the documentation for that function for a /// discussion on ensuring the lifetime of the raw pointer. /// -/// [`&str`]: str +/// [`&str`]: prim@str /// [slice.as_ptr]: ../primitive.slice.html#method.as_ptr /// [slice.len]: ../primitive.slice.html#method.len /// [`Deref`]: ops::Deref @@ -180,7 +180,7 @@ pub struct CString { /// println!("string: {}", my_string_safe()); /// ``` /// -/// [`&str`]: str +/// [`&str`]: prim@str #[derive(Hash)] #[stable(feature = "rust1", since = "1.0.0")] // FIXME: @@ -1351,7 +1351,7 @@ impl CStr { /// function will return the corresponding [`&str`] slice. Otherwise, /// it will return an error with details of where UTF-8 validation failed. /// - /// [`&str`]: str + /// [`&str`]: prim@str /// /// # Examples /// @@ -1379,6 +1379,7 @@ impl CStr { /// [`U+FFFD REPLACEMENT CHARACTER`][U+FFFD] and return a /// [`Cow`]`::`[`Owned`]`(`[`String`]`)` with the result. /// + /// [`str`]: prim@str /// [`Borrowed`]: Cow::Borrowed /// [`Owned`]: Cow::Owned /// [U+FFFD]: crate::char::REPLACEMENT_CHARACTER diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs index 32456294838..462b696db40 100644 --- a/library/std/src/io/mod.rs +++ b/library/std/src/io/mod.rs @@ -480,7 +480,7 @@ where /// ``` /// /// [`read()`]: Read::read -/// [`&str`]: str +/// [`&str`]: prim@str /// [`std::io`]: self /// [`File`]: crate::fs::File /// [slice]: ../../std/primitive.slice.html diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 00f37d90c6a..1142b74ff0d 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -172,6 +172,7 @@ //! [`Vec<T>`]: vec::Vec //! [`atomic`]: sync::atomic //! [`for`]: ../book/ch03-05-control-flow.html#looping-through-a-collection-with-for +//! [`str`]: prim@str //! [`mpsc`]: sync::mpsc //! [`std::cmp`]: cmp //! [`std::slice`]: slice |
