Skip to content

Commit

Permalink
Rollup merge of #33856 - GuillaumeGomez:fmt_error, r=alexcrichton
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Manishearth committed May 28, 2016
2 parents 81aeb0c + 394c23b commit fe9a915
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 fe9a915

Please sign in to comment.