Skip to content

Commit

Permalink
Implement Error trait for fmt::Error type
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed May 25, 2016
1 parent dd6e8d4 commit 394c23b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/libstd/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 394c23b

Please sign in to comment.