Skip to content

Commit 394c23b

Browse files
Implement Error trait for fmt::Error type
1 parent dd6e8d4 commit 394c23b

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)