Skip to content

Commit

Permalink
Rollup merge of rust-lang#57192 - czipperz:error_trait_doc_cause_to_s…
Browse files Browse the repository at this point in the history
…ource, r=wesleywiser

Change std::error::Error trait documentation to talk about `source` instead of `cause`

Resolves rust-lang#57056
  • Loading branch information
Centril authored Jan 12, 2019
2 parents bd8f464 + 564a24c commit 40a819b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/libstd/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ use string;
/// themselves through the [`Display`] and [`Debug`] traits, and may provide
/// cause chain information:
///
/// The [`cause`] method is generally used when errors cross "abstraction
/// boundaries", i.e., when a one module must report an error that is "caused"
/// by an error from a lower-level module. This setup makes it possible for the
/// high-level module to provide its own errors that do not commit to any
/// particular implementation, but also reveal some of its implementation for
/// debugging via [`cause`] chains.
/// 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.
///
/// [`Result<T, E>`]: ../result/enum.Result.html
/// [`Display`]: ../fmt/trait.Display.html
/// [`Debug`]: ../fmt/trait.Debug.html
/// [`cause`]: trait.Error.html#method.cause
/// [`source`]: trait.Error.html#method.source
#[stable(feature = "rust1", since = "1.0.0")]
pub trait Error: Debug + Display {
/// **This method is soft-deprecated.**
Expand Down

0 comments on commit 40a819b

Please sign in to comment.