diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs index 8eb2caa60b12679a23baeee0eb7675c9d97172b2..33b812ec59ff916f347ed01e91dec5cd1433b4be 100644 --- a/library/alloc/src/boxed.rs +++ b/library/alloc/src/boxed.rs @@ -126,9 +126,7 @@ //! //! [ucg#198]: https://github.com/rust-lang/unsafe-code-guidelines/issues/198 //! [dereferencing]: core::ops::Deref -//! [`Box`]: Box //! [`Box::::from_raw(value)`]: Box::from_raw -//! [`Box::::into_raw`]: Box::into_raw //! [`Global`]: crate::alloc::Global //! [`Layout`]: crate::alloc::Layout //! [`Layout::for_value(&*value)`]: crate::alloc::Layout::for_value diff --git a/library/alloc/src/str.rs b/library/alloc/src/str.rs index 578eca7d893d296f5ec8ab7eb8b9256ace62dac8..70e0c7dba5eab43128ea97a75ac75ee6b5110048 100644 --- a/library/alloc/src/str.rs +++ b/library/alloc/src/str.rs @@ -451,8 +451,6 @@ pub fn to_uppercase(&self) -> String { /// Converts a [`Box`] into a [`String`] without copying or allocating. /// - /// [`Box`]: Box - /// /// # Examples /// /// Basic usage: diff --git a/library/core/src/borrow.rs b/library/core/src/borrow.rs index 6f5a6aa7c79cabf9ab3cf72a8d39b6f6bd544936..c9040cd0a1670af8954f37e7ae3e965b3708aea0 100644 --- a/library/core/src/borrow.rs +++ b/library/core/src/borrow.rs @@ -40,7 +40,6 @@ /// provide a reference to related type `T`, it is often better to use /// [`AsRef`] as more types can safely implement it. /// -/// [`BorrowMut`]: BorrowMut /// [`Box`]: ../../std/boxed/struct.Box.html /// [`Mutex`]: ../../std/sync/struct.Mutex.html /// [`Rc`]: ../../std/rc/struct.Rc.html @@ -183,8 +182,6 @@ pub trait Borrow { /// As a companion to [`Borrow`] this trait allows a type to borrow as /// an underlying type by providing a mutable reference. See [`Borrow`] /// for more information on borrowing as another type. -/// -/// [`Borrow`]: Borrow #[stable(feature = "rust1", since = "1.0.0")] pub trait BorrowMut: Borrow { /// Mutably borrows from an owned value. diff --git a/library/core/src/convert/mod.rs b/library/core/src/convert/mod.rs index 3f7110b34cc67de60eb1bdc0b9ab3cbf00b89e3b..041f40f2cbcf5ae30099309238bfe4a03afaa6c7 100644 --- a/library/core/src/convert/mod.rs +++ b/library/core/src/convert/mod.rs @@ -135,8 +135,6 @@ pub const fn identity(x: T) -> T { /// Since both [`String`] and [`&str`] implement `AsRef` we can accept both as input argument. /// /// [`&str`]: primitive@str -/// [`Option`]: Option -/// [`Result`]: Result /// [`Borrow`]: crate::borrow::Borrow /// [`Eq`]: crate::cmp::Eq /// [`Ord`]: crate::cmp::Ord @@ -169,9 +167,6 @@ pub trait AsRef { /// **Note: This trait must not fail**. If the conversion can fail, use a /// dedicated method which returns an [`Option`] or a [`Result`]. /// -/// [`Option`]: Option -/// [`Result`]: Result -/// /// # Generic Implementations /// /// - `AsMut` auto-dereferences if the inner type is a mutable reference @@ -270,8 +265,6 @@ pub trait AsMut { /// is_hello(s); /// ``` /// -/// [`Option`]: Option -/// [`Result`]: Result /// [`String`]: ../../std/string/struct.String.html /// [`Vec`]: ../../std/vec/struct.Vec.html #[stable(feature = "rust1", since = "1.0.0")] @@ -359,8 +352,6 @@ pub trait Into: Sized { /// } /// ``` /// -/// [`Option`]: Option -/// [`Result`]: Result /// [`String`]: ../../std/string/struct.String.html /// [`from`]: From::from /// [book]: ../../book/ch09-00-error-handling.html diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs index 633175702d870a9e623d4532d432f60bf6e10d08..0023de65d2b3b2eec2ef2e10d7e19eddf087c374 100644 --- a/library/core/src/iter/traits/iterator.rs +++ b/library/core/src/iter/traits/iterator.rs @@ -805,8 +805,6 @@ fn filter

(self, predicate: P) -> Filter /// assert_eq!(iter.next(), Some(5)); /// assert_eq!(iter.next(), None); /// ``` - /// - /// [`Option`]: Option #[inline] #[stable(feature = "rust1", since = "1.0.0")] fn filter_map(self, f: F) -> FilterMap diff --git a/library/core/src/mem/mod.rs b/library/core/src/mem/mod.rs index 22e44a3c4090459a44d9c49230a4ae5706ade726..971ec5d9c8d6472cdd6a0d88952b65afdd23ea51 100644 --- a/library/core/src/mem/mod.rs +++ b/library/core/src/mem/mod.rs @@ -650,7 +650,6 @@ pub unsafe fn zeroed() -> T { /// (Notice that the rules around uninitialized integers are not finalized yet, but /// until they are, it is advisable to avoid them.) /// -/// [`MaybeUninit`]: MaybeUninit /// [uninit]: MaybeUninit::uninit /// [assume_init]: MaybeUninit::assume_init /// [inv]: MaybeUninit#initialization-invariant diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 1afa30f5843f804a268c834df69a3f64552beaad..0051c9eede070644a6be104e15628abf01c1d095 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -512,7 +512,6 @@ pub fn map_or_else U, F: FnOnce(T) -> U>(self, default: D, f: /// result of a function call, it is recommended to use [`ok_or_else`], which is /// lazily evaluated. /// - /// [`Result`]: Result /// [`Ok(v)`]: Ok /// [`Err(err)`]: Err /// [`Some(v)`]: Some @@ -539,7 +538,6 @@ pub fn ok_or(self, err: E) -> Result { /// Transforms the `Option` into a [`Result`], mapping [`Some(v)`] to /// [`Ok(v)`] and [`None`] to [`Err(err())`]. /// - /// [`Result`]: Result /// [`Ok(v)`]: Ok /// [`Err(err())`]: Err /// [`Some(v)`]: Some diff --git a/library/core/src/pin.rs b/library/core/src/pin.rs index 0b9c733f7feadfdbcfe4949a4787ea3c134d2698..b2de0e16a17bbfb3423e89f8b77fec8e98e68a76 100644 --- a/library/core/src/pin.rs +++ b/library/core/src/pin.rs @@ -349,7 +349,6 @@ //! mutable reference even when you just have [`Pin`]`<&mut Self>` (such as in your own //! [`poll`] implementation). //! -//! [`Pin

`]: Pin //! [`Deref`]: crate::ops::Deref //! [`DerefMut`]: crate::ops::DerefMut //! [`mem::swap`]: crate::mem::swap @@ -364,7 +363,6 @@ //! [`RefCell`]: crate::cell::RefCell //! [`drop`]: Drop::drop //! [`VecDeque`]: ../../std/collections/struct.VecDeque.html -//! [`Option`]: Option //! [`Some(v)`]: Some //! [`ptr::write`]: crate::ptr::write //! [`Future`]: crate::future::Future diff --git a/library/core/src/result.rs b/library/core/src/result.rs index 0b4ca2b721412b7e471ceb9c593e37cee78d8086..d6d1762572928dfa22e9ef3a91b3581edf155126 100644 --- a/library/core/src/result.rs +++ b/library/core/src/result.rs @@ -368,8 +368,6 @@ pub fn contains_err(&self, f: &F) -> bool /// Converts `self` into an [`Option`], consuming `self`, /// and discarding the error, if any. /// - /// [`Option`]: Option - /// /// # Examples /// /// Basic usage: @@ -395,8 +393,6 @@ pub fn ok(self) -> Option { /// Converts `self` into an [`Option`], consuming `self`, /// and discarding the success value, if any. /// - /// [`Option`]: Option - /// /// # Examples /// /// Basic usage: @@ -1009,8 +1005,6 @@ pub fn expect_err(self, msg: &str) -> E { /// Panics if the value is an [`Ok`], with a custom panic message provided /// by the [`Ok`]'s value. /// - /// - /// /// # Examples /// /// ```{.should_panic} diff --git a/library/std/src/error.rs b/library/std/src/error.rs index 0044e59d697e3da55ffc1397a854731877b5341a..ca83c409822fc19f832224f09308435f7005097e 100644 --- a/library/std/src/error.rs +++ b/library/std/src/error.rs @@ -42,8 +42,6 @@ /// via [`Error::source()`]. This makes it possible for the high-level /// module to provide its own errors while also revealing some of the /// implementation for debugging via `source` chains. -/// -/// [`Result`]: Result #[stable(feature = "rust1", since = "1.0.0")] pub trait Error: Debug + Display { /// The lower-level source of this error, if any. diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs index dfbf6c3f24443e84e1db0de6ee530adc65a26ca5..7ad9e446c5997404a82d51320064b9d5dbeeb929 100644 --- a/library/std/src/io/mod.rs +++ b/library/std/src/io/mod.rs @@ -240,7 +240,6 @@ //! //! [`File`]: crate::fs::File //! [`TcpStream`]: crate::net::TcpStream -//! [`Vec`]: Vec //! [`io::stdout`]: stdout //! [`io::Result`]: self::Result //! [`?` operator]: ../../book/appendix-02-operators.html @@ -1984,7 +1983,6 @@ fn read_line(&mut self, buf: &mut String) -> Result { /// also yielded an error. /// /// [`io::Result`]: self::Result - /// [`Vec`]: Vec /// [`read_until`]: BufRead::read_until /// /// # Examples diff --git a/library/std/src/path.rs b/library/std/src/path.rs index 8a75c1d6058da2eb7044af40e48271852e54abb0..243761e38978431a45f1ad5a74a4ca93e38b87c1 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -1775,7 +1775,6 @@ pub fn to_str(&self) -> Option<&str> { /// Any non-Unicode sequences are replaced with /// [`U+FFFD REPLACEMENT CHARACTER`][U+FFFD]. /// - /// [`Cow`]: Cow /// [U+FFFD]: super::char::REPLACEMENT_CHARACTER /// /// # Examples diff --git a/library/std/src/primitive_docs.rs b/library/std/src/primitive_docs.rs index ec12e9f09d8b1eab4da8b50547a44ae75bfcb8a3..0677a5f67159298d05fd94e3dadd1aae4e69576e 100644 --- a/library/std/src/primitive_docs.rs +++ b/library/std/src/primitive_docs.rs @@ -184,9 +184,6 @@ mod prim_bool {} /// because `!` coerces to `Result` automatically. /// /// [`String::from_str`]: str::FromStr::from_str -/// [`Result`]: Result -/// [`Result`]: Result -/// [`Result`]: Result /// [`String`]: string::String /// [`FromStr`]: str::FromStr ///