We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5655b8 commit f6a833aCopy full SHA for f6a833a
src/libstd/error.rs
@@ -58,6 +58,8 @@ pub trait Error: Debug + Display {
58
/// new code should use [`Display`] instead
59
/// and new `impl`s can omit it.
60
///
61
+ /// To obtain error description as a string, use `to_string()`.
62
+ ///
63
/// [`Display`]: ../fmt/trait.Display.html
64
65
/// # Examples
@@ -73,7 +75,7 @@ pub trait Error: Debug + Display {
73
75
/// ```
74
76
#[stable(feature = "rust1", since = "1.0.0")]
77
fn description(&self) -> &str {
- ""
78
+ "description() is deprecated; use Display"
79
}
80
81
/// The lower-level cause of this error, if any.
0 commit comments