about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-08-12 12:07:12 +0900
committerGitHub <noreply@github.com>2020-08-12 12:07:12 +0900
commitc423fdeb7442ae5b62a01ed9de516e85a262f01b (patch)
treee896008f774fdc80b1caecac824fa5801c8df2fa
parent0bdb83942d8757680e5b616217f075639145e778 (diff)
parent3ff06a9f2cd0dab421b32b00dcb573c8bc1907b1 (diff)
downloadrust-c423fdeb7442ae5b62a01ed9de516e85a262f01b.tar.gz
rust-c423fdeb7442ae5b62a01ed9de516e85a262f01b.zip
Rollup merge of #75368 - poliorcetics:intra-doc-links-std-prelude, r=jyn514
Move to doc links inside the prelude

Helps with #75080.

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc
-rw-r--r--library/std/src/prelude/mod.rs83
1 files changed, 25 insertions, 58 deletions
diff --git a/library/std/src/prelude/mod.rs b/library/std/src/prelude/mod.rs
index 48f7cf16988..710c616be73 100644
--- a/library/std/src/prelude/mod.rs
+++ b/library/std/src/prelude/mod.rs
@@ -17,7 +17,7 @@
 //! such as [`std::io::prelude`]. Various libraries in the Rust ecosystem may
 //! also define their own preludes.
 //!
-//! [`std::io::prelude`]: ../io/prelude/index.html
+//! [`std::io::prelude`]: crate::io::prelude
 //!
 //! The difference between 'the prelude' and these other preludes is that they
 //! are not automatically `use`'d, and must be imported manually. This is still
@@ -49,67 +49,34 @@
 //! * [`std::iter`]::{[`Iterator`], [`Extend`], [`IntoIterator`],
 //!   [`DoubleEndedIterator`], [`ExactSizeIterator`]}. Iterators of various
 //!   kinds.
-//! * [`std::option`]::[`Option`]::{`self`, `Some`, `None`}. A type which
-//!   expresses the presence or absence of a value. This type is so commonly
-//!   used, its variants are also exported.
-//! * [`std::result`]::[`Result`]::{`self`, `Ok`, `Err`}. A type for functions
-//!   that may succeed or fail. Like [`Option`], its variants are exported as
-//!   well.
+//! * [`std::option`]::[`Option`]::{[`self`][`Option`], [`Some`], [`None`]}. A
+//!   type which expresses the presence or absence of a value. This type is so
+//!   commonly used, its variants are also exported.
+//! * [`std::result`]::[`Result`]::{[`self`][`Result`], [`Ok`], [`Err`]}. A type
+//!   for functions that may succeed or fail. Like [`Option`], its variants are
+//!   exported as well.
 //! * [`std::string`]::{[`String`], [`ToString`]}, heap allocated strings.
-//! * [`std::vec`]::[`Vec`](../vec/struct.Vec.html), a growable, heap-allocated
+//! * [`std::vec`]::[`Vec`], a growable, heap-allocated
 //!   vector.
 //!
-//! [`AsMut`]: ../convert/trait.AsMut.html
-//! [`AsRef`]: ../convert/trait.AsRef.html
-//! [`Box`]: ../boxed/struct.Box.html
-//! [`Clone`]: ../clone/trait.Clone.html
-//! [`Copy`]: ../marker/trait.Copy.html
-//! [`Default`]: ../default/trait.Default.html
-//! [`DoubleEndedIterator`]: ../iter/trait.DoubleEndedIterator.html
-//! [`Drop`]: ../ops/trait.Drop.html
-//! [`Eq`]: ../cmp/trait.Eq.html
-//! [`ExactSizeIterator`]: ../iter/trait.ExactSizeIterator.html
-//! [`Extend`]: ../iter/trait.Extend.html
-//! [`FnMut`]: ../ops/trait.FnMut.html
-//! [`FnOnce`]: ../ops/trait.FnOnce.html
-//! [`Fn`]: ../ops/trait.Fn.html
-//! [`From`]: ../convert/trait.From.html
-//! [`IntoIterator`]: ../iter/trait.IntoIterator.html
-//! [`Into`]: ../convert/trait.Into.html
-//! [`Iterator`]: ../iter/trait.Iterator.html
-//! [`Option`]: ../option/enum.Option.html
-//! [`Ord`]: ../cmp/trait.Ord.html
-//! [`PartialEq`]: ../cmp/trait.PartialEq.html
-//! [`PartialOrd`]: ../cmp/trait.PartialOrd.html
-//! [`Result`]: ../result/enum.Result.html
-//! [`Send`]: ../marker/trait.Send.html
-//! [`Sized`]: ../marker/trait.Sized.html
-//! [`SliceConcatExt`]: ../slice/trait.SliceConcatExt.html
-//! [`String`]: ../string/struct.String.html
-//! [`Sync`]: ../marker/trait.Sync.html
-//! [`ToOwned`]: ../borrow/trait.ToOwned.html
-//! [`ToString`]: ../string/trait.ToString.html
-//! [`Unpin`]: ../marker/trait.Unpin.html
-//! [`Vec`]: ../vec/struct.Vec.html
-//! [`Clone::clone`]: ../clone/trait.Clone.html#tymethod.clone
-//! [`mem::drop`]: ../mem/fn.drop.html
-//! [`std::borrow`]: ../borrow/index.html
-//! [`std::boxed`]: ../boxed/index.html
-//! [`std::clone`]: ../clone/index.html
-//! [`std::cmp`]: ../cmp/index.html
-//! [`std::convert`]: ../convert/index.html
-//! [`std::default`]: ../default/index.html
-//! [`std::iter`]: ../iter/index.html
-//! [`std::marker`]: ../marker/index.html
-//! [`std::mem`]: ../mem/index.html
-//! [`std::ops`]: ../ops/index.html
-//! [`std::option`]: ../option/index.html
-//! [`std::prelude::v1`]: v1/index.html
-//! [`std::result`]: ../result/index.html
-//! [`std::slice`]: ../slice/index.html
-//! [`std::string`]: ../string/index.html
+//! [`mem::drop`]: crate::mem::drop
+//! [`std::borrow`]: crate::borrow
+//! [`std::boxed`]: crate::boxed
+//! [`std::clone`]: crate::clone
+//! [`std::cmp`]: crate::cmp
+//! [`std::convert`]: crate::convert
+//! [`std::default`]: crate::default
+//! [`std::iter`]: crate::iter
+//! [`std::marker`]: crate::marker
+//! [`std::mem`]: crate::mem
+//! [`std::ops`]: crate::ops
+//! [`std::option`]: crate::option
+//! [`std::prelude::v1`]: v1
+//! [`std::result`]: crate::result
+//! [`std::slice`]: crate::slice
+//! [`std::string`]: crate::string
 //! [`std::vec`]: ../vec/index.html
-//! [`to_owned`]: ../borrow/trait.ToOwned.html#tymethod.to_owned
+//! [`to_owned`]: crate::borrow::ToOwned::to_owned
 //! [book-closures]: ../../book/ch13-01-closures.html
 //! [book-dtor]: ../../book/ch15-03-drop.html
 //! [book-enums]: ../../book/ch06-01-defining-an-enum.html