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
|
/// themselves through the [`Display`] and [`Debug`] traits, and may provide
|
||||||
/// cause chain information:
|
/// cause chain information:
|
||||||
///
|
///
|
||||||
/// The [`source`] method is generally used when errors cross "abstraction
|
/// The [`Error::source`] method is generally used when errors cross
|
||||||
/// boundaries". If one module must report an error that is caused by an error
|
/// "abstraction boundaries". If one module must report an error that is caused
|
||||||
/// from a lower-level module, it can allow access to that error via the
|
/// by an error from a lower-level module, it can allow accessing that error
|
||||||
/// [`source`] method. This makes it possible for the high-level module to
|
/// via the [`Error::source`] method. This makes it possible for the high-level
|
||||||
/// provide its own errors while also revealing some of the implementation for
|
/// module to provide its own errors while also revealing some of the
|
||||||
/// debugging via [`source`] chains.
|
/// implementation for debugging via [`Error::source`] chains.
|
||||||
///
|
///
|
||||||
/// [`Result<T, E>`]: Result
|
/// [`Result<T, E>`]: Result
|
||||||
/// [`source`]: Error::source
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub trait Error: Debug + Display {
|
pub trait Error: Debug + Display {
|
||||||
/// The lower-level source of this error, if any.
|
/// 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
|
/// 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,
|
/// If you want to omit the current error and only use its sources,
|
||||||
/// use `skip(1)`.
|
/// use `skip(1)`.
|
||||||
|
@ -686,8 +685,6 @@ impl dyn Error {
|
||||||
/// assert!(iter.next().is_none());
|
/// assert!(iter.next().is_none());
|
||||||
/// assert!(iter.next().is_none());
|
/// assert!(iter.next().is_none());
|
||||||
/// ```
|
/// ```
|
||||||
///
|
|
||||||
/// [`source`]: Error::source
|
|
||||||
#[unstable(feature = "error_iter", issue = "58520")]
|
#[unstable(feature = "error_iter", issue = "58520")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn chain(&self) -> Chain<'_> {
|
pub fn chain(&self) -> Chain<'_> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue