Implement Error trait for fmt::Error type

This commit is contained in:
Guillaume Gomez 2016-05-25 00:49:49 +02:00
parent dd6e8d45e1
commit 394c23b084

View File

@ -212,6 +212,13 @@ impl<T: Error> Error for Box<T> {
}
}
#[stable(feature = "fmt_error", since = "1.11.0")]
impl Error for fmt::Error {
fn description(&self) -> &str {
"an error occurred when formatting an argument"
}
}
// copied from any.rs
impl Error + 'static {
/// Returns true if the boxed type is the same as `T`