Skip to content

Commit

Permalink
Rollup merge of rust-lang#75946 - pickfire:patch-8, r=jyn514
Browse files Browse the repository at this point in the history
Error use explicit intra-doc link and fix text

Follow up of rust-lang#75629

r? @jyn514
  • Loading branch information
pietroalbini committed Aug 28, 2020
2 parents be1b304 + 3a814f3 commit cbe3aef
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions library/std/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
/// [`Error::source()`] 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 [`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<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.
Expand Down Expand Up @@ -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)`.
Expand Down Expand Up @@ -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<'_> {
Expand Down

0 comments on commit cbe3aef

Please sign in to comment.