Skip to content

Commit fe9a915

Browse files
committed
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.
2 parents 81aeb0c + 394c23b commit fe9a915

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/libstd/error.rs

+7
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,13 @@ impl<T: Error> Error for Box<T> {
212212
}
213213
}
214214

215+
#[stable(feature = "fmt_error", since = "1.11.0")]
216+
impl Error for fmt::Error {
217+
fn description(&self) -> &str {
218+
"an error occurred when formatting an argument"
219+
}
220+
}
221+
215222
// copied from any.rs
216223
impl Error + 'static {
217224
/// Returns true if the boxed type is the same as `T`

0 commit comments

Comments
 (0)