Error use explicit intra-doc link and fix text
This commit is contained in:
parent
ffd59bf9c6
commit
16d8d4b899
1 changed files with 7 additions and 10 deletions
|
@ -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<'_> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue