Remove many unnecessary manual link resolves from library

Now that #76934 has merged, we can remove a lot of these! E.g, this is
no longer necessary:

    [`Vec<T>`]: Vec
This commit is contained in:
Camelid 2020-10-11 13:36:41 -07:00
parent 44e3daf5ee
commit 0506789014
13 changed files with 0 additions and 37 deletions

View File

@ -126,9 +126,7 @@
//! //!
//! [ucg#198]: https://github.com/rust-lang/unsafe-code-guidelines/issues/198 //! [ucg#198]: https://github.com/rust-lang/unsafe-code-guidelines/issues/198
//! [dereferencing]: core::ops::Deref //! [dereferencing]: core::ops::Deref
//! [`Box<T>`]: Box
//! [`Box::<T>::from_raw(value)`]: Box::from_raw //! [`Box::<T>::from_raw(value)`]: Box::from_raw
//! [`Box::<T>::into_raw`]: Box::into_raw
//! [`Global`]: crate::alloc::Global //! [`Global`]: crate::alloc::Global
//! [`Layout`]: crate::alloc::Layout //! [`Layout`]: crate::alloc::Layout
//! [`Layout::for_value(&*value)`]: crate::alloc::Layout::for_value //! [`Layout::for_value(&*value)`]: crate::alloc::Layout::for_value

View File

@ -451,8 +451,6 @@ pub fn to_uppercase(&self) -> String {
/// Converts a [`Box<str>`] into a [`String`] without copying or allocating. /// Converts a [`Box<str>`] into a [`String`] without copying or allocating.
/// ///
/// [`Box<str>`]: Box
///
/// # Examples /// # Examples
/// ///
/// Basic usage: /// Basic usage:

View File

@ -40,7 +40,6 @@
/// provide a reference to related type `T`, it is often better to use /// provide a reference to related type `T`, it is often better to use
/// [`AsRef<T>`] as more types can safely implement it. /// [`AsRef<T>`] as more types can safely implement it.
/// ///
/// [`BorrowMut<T>`]: BorrowMut
/// [`Box<T>`]: ../../std/boxed/struct.Box.html /// [`Box<T>`]: ../../std/boxed/struct.Box.html
/// [`Mutex<T>`]: ../../std/sync/struct.Mutex.html /// [`Mutex<T>`]: ../../std/sync/struct.Mutex.html
/// [`Rc<T>`]: ../../std/rc/struct.Rc.html /// [`Rc<T>`]: ../../std/rc/struct.Rc.html
@ -183,8 +182,6 @@ pub trait Borrow<Borrowed: ?Sized> {
/// As a companion to [`Borrow<T>`] this trait allows a type to borrow as /// As a companion to [`Borrow<T>`] this trait allows a type to borrow as
/// an underlying type by providing a mutable reference. See [`Borrow<T>`] /// an underlying type by providing a mutable reference. See [`Borrow<T>`]
/// for more information on borrowing as another type. /// for more information on borrowing as another type.
///
/// [`Borrow<T>`]: Borrow
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub trait BorrowMut<Borrowed: ?Sized>: Borrow<Borrowed> { pub trait BorrowMut<Borrowed: ?Sized>: Borrow<Borrowed> {
/// Mutably borrows from an owned value. /// Mutably borrows from an owned value.

View File

@ -135,8 +135,6 @@ pub const fn identity<T>(x: T) -> T {
/// Since both [`String`] and [`&str`] implement `AsRef<str>` we can accept both as input argument. /// Since both [`String`] and [`&str`] implement `AsRef<str>` we can accept both as input argument.
/// ///
/// [`&str`]: primitive@str /// [`&str`]: primitive@str
/// [`Option<T>`]: Option
/// [`Result<T, E>`]: Result
/// [`Borrow`]: crate::borrow::Borrow /// [`Borrow`]: crate::borrow::Borrow
/// [`Eq`]: crate::cmp::Eq /// [`Eq`]: crate::cmp::Eq
/// [`Ord`]: crate::cmp::Ord /// [`Ord`]: crate::cmp::Ord
@ -169,9 +167,6 @@ pub trait AsRef<T: ?Sized> {
/// **Note: This trait must not fail**. If the conversion can fail, use a /// **Note: This trait must not fail**. If the conversion can fail, use a
/// dedicated method which returns an [`Option<T>`] or a [`Result<T, E>`]. /// dedicated method which returns an [`Option<T>`] or a [`Result<T, E>`].
/// ///
/// [`Option<T>`]: Option
/// [`Result<T, E>`]: Result
///
/// # Generic Implementations /// # Generic Implementations
/// ///
/// - `AsMut` auto-dereferences if the inner type is a mutable reference /// - `AsMut` auto-dereferences if the inner type is a mutable reference
@ -270,8 +265,6 @@ pub trait AsMut<T: ?Sized> {
/// is_hello(s); /// is_hello(s);
/// ``` /// ```
/// ///
/// [`Option<T>`]: Option
/// [`Result<T, E>`]: Result
/// [`String`]: ../../std/string/struct.String.html /// [`String`]: ../../std/string/struct.String.html
/// [`Vec`]: ../../std/vec/struct.Vec.html /// [`Vec`]: ../../std/vec/struct.Vec.html
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
@ -359,8 +352,6 @@ pub trait Into<T>: Sized {
/// } /// }
/// ``` /// ```
/// ///
/// [`Option<T>`]: Option
/// [`Result<T, E>`]: Result
/// [`String`]: ../../std/string/struct.String.html /// [`String`]: ../../std/string/struct.String.html
/// [`from`]: From::from /// [`from`]: From::from
/// [book]: ../../book/ch09-00-error-handling.html /// [book]: ../../book/ch09-00-error-handling.html

View File

@ -805,8 +805,6 @@ fn filter<P>(self, predicate: P) -> Filter<Self, P>
/// assert_eq!(iter.next(), Some(5)); /// assert_eq!(iter.next(), Some(5));
/// assert_eq!(iter.next(), None); /// assert_eq!(iter.next(), None);
/// ``` /// ```
///
/// [`Option<T>`]: Option
#[inline] #[inline]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>

View File

@ -650,7 +650,6 @@ pub unsafe fn zeroed<T>() -> T {
/// (Notice that the rules around uninitialized integers are not finalized yet, but /// (Notice that the rules around uninitialized integers are not finalized yet, but
/// until they are, it is advisable to avoid them.) /// until they are, it is advisable to avoid them.)
/// ///
/// [`MaybeUninit<T>`]: MaybeUninit
/// [uninit]: MaybeUninit::uninit /// [uninit]: MaybeUninit::uninit
/// [assume_init]: MaybeUninit::assume_init /// [assume_init]: MaybeUninit::assume_init
/// [inv]: MaybeUninit#initialization-invariant /// [inv]: MaybeUninit#initialization-invariant

View File

@ -512,7 +512,6 @@ pub fn map_or_else<U, D: FnOnce() -> U, F: FnOnce(T) -> U>(self, default: D, f:
/// result of a function call, it is recommended to use [`ok_or_else`], which is /// result of a function call, it is recommended to use [`ok_or_else`], which is
/// lazily evaluated. /// lazily evaluated.
/// ///
/// [`Result<T, E>`]: Result
/// [`Ok(v)`]: Ok /// [`Ok(v)`]: Ok
/// [`Err(err)`]: Err /// [`Err(err)`]: Err
/// [`Some(v)`]: Some /// [`Some(v)`]: Some
@ -539,7 +538,6 @@ pub fn ok_or<E>(self, err: E) -> Result<T, E> {
/// Transforms the `Option<T>` into a [`Result<T, E>`], mapping [`Some(v)`] to /// Transforms the `Option<T>` into a [`Result<T, E>`], mapping [`Some(v)`] to
/// [`Ok(v)`] and [`None`] to [`Err(err())`]. /// [`Ok(v)`] and [`None`] to [`Err(err())`].
/// ///
/// [`Result<T, E>`]: Result
/// [`Ok(v)`]: Ok /// [`Ok(v)`]: Ok
/// [`Err(err())`]: Err /// [`Err(err())`]: Err
/// [`Some(v)`]: Some /// [`Some(v)`]: Some

View File

@ -349,7 +349,6 @@
//! mutable reference even when you just have [`Pin`]`<&mut Self>` (such as in your own //! mutable reference even when you just have [`Pin`]`<&mut Self>` (such as in your own
//! [`poll`] implementation). //! [`poll`] implementation).
//! //!
//! [`Pin<P>`]: Pin
//! [`Deref`]: crate::ops::Deref //! [`Deref`]: crate::ops::Deref
//! [`DerefMut`]: crate::ops::DerefMut //! [`DerefMut`]: crate::ops::DerefMut
//! [`mem::swap`]: crate::mem::swap //! [`mem::swap`]: crate::mem::swap
@ -364,7 +363,6 @@
//! [`RefCell<T>`]: crate::cell::RefCell //! [`RefCell<T>`]: crate::cell::RefCell
//! [`drop`]: Drop::drop //! [`drop`]: Drop::drop
//! [`VecDeque<T>`]: ../../std/collections/struct.VecDeque.html //! [`VecDeque<T>`]: ../../std/collections/struct.VecDeque.html
//! [`Option<T>`]: Option
//! [`Some(v)`]: Some //! [`Some(v)`]: Some
//! [`ptr::write`]: crate::ptr::write //! [`ptr::write`]: crate::ptr::write
//! [`Future`]: crate::future::Future //! [`Future`]: crate::future::Future

View File

@ -368,8 +368,6 @@ pub fn contains_err<F>(&self, f: &F) -> bool
/// Converts `self` into an [`Option<T>`], consuming `self`, /// Converts `self` into an [`Option<T>`], consuming `self`,
/// and discarding the error, if any. /// and discarding the error, if any.
/// ///
/// [`Option<T>`]: Option
///
/// # Examples /// # Examples
/// ///
/// Basic usage: /// Basic usage:
@ -395,8 +393,6 @@ pub fn ok(self) -> Option<T> {
/// Converts `self` into an [`Option<E>`], consuming `self`, /// Converts `self` into an [`Option<E>`], consuming `self`,
/// and discarding the success value, if any. /// and discarding the success value, if any.
/// ///
/// [`Option<E>`]: Option
///
/// # Examples /// # Examples
/// ///
/// Basic usage: /// 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 /// Panics if the value is an [`Ok`], with a custom panic message provided
/// by the [`Ok`]'s value. /// by the [`Ok`]'s value.
/// ///
///
///
/// # Examples /// # Examples
/// ///
/// ```{.should_panic} /// ```{.should_panic}

View File

@ -42,8 +42,6 @@
/// via [`Error::source()`]. This makes it possible for the high-level /// via [`Error::source()`]. This makes it possible for the high-level
/// module to provide its own errors while also revealing some of the /// module to provide its own errors while also revealing some of the
/// implementation for debugging via `source` chains. /// implementation for debugging via `source` chains.
///
/// [`Result<T, E>`]: Result
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub trait Error: Debug + Display { pub trait Error: Debug + Display {
/// The lower-level source of this error, if any. /// The lower-level source of this error, if any.

View File

@ -240,7 +240,6 @@
//! //!
//! [`File`]: crate::fs::File //! [`File`]: crate::fs::File
//! [`TcpStream`]: crate::net::TcpStream //! [`TcpStream`]: crate::net::TcpStream
//! [`Vec<T>`]: Vec
//! [`io::stdout`]: stdout //! [`io::stdout`]: stdout
//! [`io::Result`]: self::Result //! [`io::Result`]: self::Result
//! [`?` operator]: ../../book/appendix-02-operators.html //! [`?` operator]: ../../book/appendix-02-operators.html
@ -1984,7 +1983,6 @@ fn read_line(&mut self, buf: &mut String) -> Result<usize> {
/// also yielded an error. /// also yielded an error.
/// ///
/// [`io::Result`]: self::Result /// [`io::Result`]: self::Result
/// [`Vec<u8>`]: Vec
/// [`read_until`]: BufRead::read_until /// [`read_until`]: BufRead::read_until
/// ///
/// # Examples /// # Examples

View File

@ -1775,7 +1775,6 @@ pub fn to_str(&self) -> Option<&str> {
/// Any non-Unicode sequences are replaced with /// Any non-Unicode sequences are replaced with
/// [`U+FFFD REPLACEMENT CHARACTER`][U+FFFD]. /// [`U+FFFD REPLACEMENT CHARACTER`][U+FFFD].
/// ///
/// [`Cow<str>`]: Cow
/// [U+FFFD]: super::char::REPLACEMENT_CHARACTER /// [U+FFFD]: super::char::REPLACEMENT_CHARACTER
/// ///
/// # Examples /// # Examples

View File

@ -184,9 +184,6 @@ mod prim_bool {}
/// because `!` coerces to `Result<!, ConnectionError>` automatically. /// because `!` coerces to `Result<!, ConnectionError>` automatically.
/// ///
/// [`String::from_str`]: str::FromStr::from_str /// [`String::from_str`]: str::FromStr::from_str
/// [`Result<String, !>`]: Result
/// [`Result<T, !>`]: Result
/// [`Result<!, E>`]: Result
/// [`String`]: string::String /// [`String`]: string::String
/// [`FromStr`]: str::FromStr /// [`FromStr`]: str::FromStr
/// ///