From 394c23b084bcdfe8f45de194ebe77d4e06d4d5e9 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 25 May 2016 00:49:49 +0200 Subject: [PATCH] Implement Error trait for fmt::Error type --- src/libstd/error.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libstd/error.rs b/src/libstd/error.rs index d49d97649467a..2a2d41112ffae 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -212,6 +212,13 @@ impl Error for Box { } } +#[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`