Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error use explicit intra-doc link and fix text #75946

Merged
merged 3 commits into from
Aug 28, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
/// The [`Error::source`] method is generally used when errors cross
pickfire marked this conversation as resolved.
Show resolved Hide resolved
/// "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
pickfire marked this conversation as resolved.
Show resolved Hide resolved
/// module to provide its own errors while also revealing some of the
/// implementation for debugging via [`Error::source`] chains.
pickfire marked this conversation as resolved.
Show resolved Hide resolved
///
/// [`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