Skip to content

Commit cbe3aef

Browse files
authored
Rollup merge of rust-lang#75946 - pickfire:patch-8, r=jyn514
Error use explicit intra-doc link and fix text Follow up of rust-lang#75629 r? @jyn514
2 parents be1b304 + 3a814f3 commit cbe3aef

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

library/std/src/error.rs

+7-10
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,14 @@ use crate::string;
3333
/// themselves through the [`Display`] and [`Debug`] traits, and may provide
3434
/// cause chain information:
3535
///
36-
/// The [`source`] method is generally used when errors cross "abstraction
37-
/// boundaries". If one module must report an error that is caused by an error
38-
/// from a lower-level module, it can allow access to that error via the
39-
/// [`source`] method. This makes it possible for the high-level module to
40-
/// provide its own errors while also revealing some of the implementation for
41-
/// debugging via [`source`] chains.
36+
/// [`Error::source()`] is generally used when errors cross
37+
/// "abstraction boundaries". If one module must report an error that is caused
38+
/// by an error from a lower-level module, it can allow accessing that error
39+
/// via [`Error::source()`]. This makes it possible for the high-level
40+
/// module to provide its own errors while also revealing some of the
41+
/// implementation for debugging via `source` chains.
4242
///
4343
/// [`Result<T, E>`]: Result
44-
/// [`source`]: Error::source
4544
#[stable(feature = "rust1", since = "1.0.0")]
4645
pub trait Error: Debug + Display {
4746
/// The lower-level source of this error, if any.
@@ -636,7 +635,7 @@ impl dyn Error {
636635
}
637636

638637
/// Returns an iterator starting with the current error and continuing with
639-
/// recursively calling [`source`].
638+
/// recursively calling [`Error::source`].
640639
///
641640
/// If you want to omit the current error and only use its sources,
642641
/// use `skip(1)`.
@@ -686,8 +685,6 @@ impl dyn Error {
686685
/// assert!(iter.next().is_none());
687686
/// assert!(iter.next().is_none());
688687
/// ```
689-
///
690-
/// [`source`]: Error::source
691688
#[unstable(feature = "error_iter", issue = "58520")]
692689
#[inline]
693690
pub fn chain(&self) -> Chain<'_> {

0 commit comments

Comments
 (0)