diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2016-05-28 19:52:16 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2016-05-28 19:52:16 +0530 |
| commit | fe9a91589ec5eb9e1a2cb1edc50be1f18c65fae5 (patch) | |
| tree | c1cf8fde1eef116c1deb34ede7b1211e79115712 /src/libstd | |
| parent | 81aeb0cddea5a614a4eebc0f0384fa27a7eb011f (diff) | |
| parent | 394c23b084bcdfe8f45de194ebe77d4e06d4d5e9 (diff) | |
| download | rust-fe9a91589ec5eb9e1a2cb1edc50be1f18c65fae5.tar.gz rust-fe9a91589ec5eb9e1a2cb1edc50be1f18c65fae5.zip | |
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.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/error.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/error.rs b/src/libstd/error.rs index d49d9764946..2a2d41112ff 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -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` |
