diff options
| author | Czipperz <czipperz@gmail.com> | 2018-12-29 02:09:21 -0500 |
|---|---|---|
| committer | Czipperz <czipperz@gmail.com> | 2019-01-08 17:45:54 -0500 |
| commit | 564a24c772c6eb6dcad0388a80b8987bc57bf614 (patch) | |
| tree | 99467e744c3a4e7cdc2fbde9c97a6b6e80df2020 | |
| parent | 6ecad338381cc3b8d56e2df22e5971a598eddd6c (diff) | |
| download | rust-564a24c772c6eb6dcad0388a80b8987bc57bf614.tar.gz rust-564a24c772c6eb6dcad0388a80b8987bc57bf614.zip | |
Change std::error::Error trait documentation to talk about `source` instead of `cause`
| -rw-r--r-- | src/libstd/error.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/error.rs b/src/libstd/error.rs index f026cadd639..2f9efb3f0fb 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -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.** |
