about summary refs log tree commit diff
diff options
context:
space:
mode:
authorIvan Tham <pickfire@riseup.net>2020-08-26 22:41:56 +0800
committerGitHub <noreply@github.com>2020-08-26 22:41:56 +0800
commit16d8d4b899c8f23456027d0baec6ed83d256507c (patch)
treeee81218ed5ab24934dc38c16897c061c651d7061
parentffd59bf9c62125813abae8ca52f0ac3a67459e8f (diff)
downloadrust-16d8d4b899c8f23456027d0baec6ed83d256507c.tar.gz
rust-16d8d4b899c8f23456027d0baec6ed83d256507c.zip
Error use explicit intra-doc link and fix text
-rw-r--r--library/std/src/error.rs17
1 files changed, 7 insertions, 10 deletions
diff --git a/library/std/src/error.rs b/library/std/src/error.rs
index 84e686c2fef..9869ccec546 100644
--- a/library/std/src/error.rs
+++ b/library/std/src/error.rs
@@ -33,15 +33,14 @@ use crate::string;
 /// themselves through the [`Display`] and [`Debug`] traits, and may provide
 /// cause chain information:
 ///
-/// The [`source`] method is generally used when errors cross "abstraction
-/// boundaries". If one module must report an error that is caused by an error
-/// from a lower-level module, it can allow access to that error via the
-/// [`source`] method. 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.
+/// The [`Error::source`] method is generally used when errors cross
+/// "abstraction boundaries". If one module must report an error that is caused
+/// by an error from a lower-level module, it can allow accessing that error
+/// via the [`Error::source`] method. This makes it possible for the high-level
+/// module to provide its own errors while also revealing some of the
+/// implementation for debugging via [`Error::source`] chains.
 ///
 /// [`Result<T, E>`]: Result
-/// [`source`]: Error::source
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait Error: Debug + Display {
     /// The lower-level source of this error, if any.
@@ -636,7 +635,7 @@ impl dyn Error {
     }
 
     /// Returns an iterator starting with the current error and continuing with
-    /// recursively calling [`source`].
+    /// recursively calling [`Error::source`].
     ///
     /// If you want to omit the current error and only use its sources,
     /// use `skip(1)`.
@@ -686,8 +685,6 @@ impl dyn Error {
     /// assert!(iter.next().is_none());
     /// assert!(iter.next().is_none());
     /// ```
-    ///
-    /// [`source`]: Error::source
     #[unstable(feature = "error_iter", issue = "58520")]
     #[inline]
     pub fn chain(&self) -> Chain<'_> {