diff options
| -rw-r--r-- | library/alloc/src/collections/linked_list.rs | 8 | ||||
| -rw-r--r-- | library/alloc/src/fmt.rs | 3 | ||||
| -rw-r--r-- | library/alloc/src/rc.rs | 3 | ||||
| -rw-r--r-- | library/alloc/src/string.rs | 2 | ||||
| -rw-r--r-- | library/alloc/src/sync.rs | 4 |
5 files changed, 6 insertions, 14 deletions
diff --git a/library/alloc/src/collections/linked_list.rs b/library/alloc/src/collections/linked_list.rs index 74155ea66d0..5390b57a1d9 100644 --- a/library/alloc/src/collections/linked_list.rs +++ b/library/alloc/src/collections/linked_list.rs @@ -50,10 +50,8 @@ struct Node<T> { /// An iterator over the elements of a `LinkedList`. /// -/// This `struct` is created by the [`iter`] method on [`LinkedList`]. See its +/// This `struct` is created by [`LinkedList::iter()`]. See its /// documentation for more. -/// -/// [`iter`]: LinkedList::iter #[stable(feature = "rust1", since = "1.0.0")] pub struct Iter<'a, T: 'a> { head: Option<NonNull<Node<T>>>, @@ -79,10 +77,8 @@ impl<T> Clone for Iter<'_, T> { /// A mutable iterator over the elements of a `LinkedList`. /// -/// This `struct` is created by the [`iter_mut`] method on [`LinkedList`]. See its +/// This `struct` is created by [`LinkedList::iter_mut()`]. See its /// documentation for more. -/// -/// [`iter_mut`]: LinkedList::iter_mut #[stable(feature = "rust1", since = "1.0.0")] pub struct IterMut<'a, T: 'a> { // We do *not* exclusively own the entire list here, references to node's `element` diff --git a/library/alloc/src/fmt.rs b/library/alloc/src/fmt.rs index 016b5446f4d..a886e17f5a9 100644 --- a/library/alloc/src/fmt.rs +++ b/library/alloc/src/fmt.rs @@ -501,9 +501,6 @@ //! it would internally pass around this structure until it has been determined //! where output should go to. //! -//! [`usize`]: core::usize -//! [`isize`]: core::isize -//! [`i8`]: core::i8 //! [`fmt::Result`]: Result //! [`Result`]: core::result::Result //! [`std::fmt::Error`]: Error diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index a41592a45b8..f8b1c21e977 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -393,7 +393,7 @@ impl<T> Rc<T> { /// Returns the inner value, if the `Rc` has exactly one strong reference. /// - /// Otherwise, an [`Err`][Result] is returned with the same `Rc` that was + /// Otherwise, an [`Err`] is returned with the same `Rc` that was /// passed in. /// /// This will succeed even if there are outstanding weak references. @@ -1743,7 +1743,6 @@ impl<T> Weak<T> { /// [`into_raw`]: Weak::into_raw /// [`upgrade`]: Weak::upgrade /// [`new`]: Weak::new - /// [`forget`]: std::mem::forget #[stable(feature = "weak_into_raw", since = "1.45.0")] pub unsafe fn from_raw(ptr: *const T) -> Self { if ptr.is_null() { diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index 223d6755e26..d7d7b6bd157 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -492,7 +492,7 @@ impl String { /// `from_utf8_lossy()` will replace any invalid UTF-8 sequences with /// [`U+FFFD REPLACEMENT CHARACTER`][U+FFFD], which looks like this: � /// - /// [byteslice]: core::slice + /// [byteslice]: ../../std/primitive.slice.html /// [U+FFFD]: core::char::REPLACEMENT_CHARACTER /// /// If you are sure that the byte slice is valid UTF-8, and you don't want diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index 6234f6cc321..4444a7a3132 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -387,7 +387,7 @@ impl<T> Arc<T> { /// Returns the inner value, if the `Arc` has exactly one strong reference. /// - /// Otherwise, an [`Err`][Result] is returned with the same `Arc` that was + /// Otherwise, an [`Err`] is returned with the same `Arc` that was /// passed in. /// /// This will succeed even if there are outstanding weak references. @@ -1168,7 +1168,7 @@ impl<T: ?Sized> Arc<T> { /// Returns a mutable reference into the given `Arc`, if there are /// no other `Arc` or [`Weak`] pointers to the same allocation. /// - /// Returns [`None`][Option] otherwise, because it is not safe to + /// Returns [`None`] otherwise, because it is not safe to /// mutate a shared value. /// /// See also [`make_mut`][make_mut], which will [`clone`][clone] |
