Rollup merge of #33856 - GuillaumeGomez:fmt_error, r=alexcrichton
Implement Error trait for fmt::Error type Fixes #33827. r? @alexcrichton Just one last thing: I added a feature name, but don't hesitate to ask me to change it if you think it doesn't fit well.
This commit is contained in:
commit
fe9a91589e
@ -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`
|
||||
|
Loading…
x
Reference in New Issue
Block a user