about summary refs log tree commit diff
path: root/src/libstd/error.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-03-12 16:32:21 +0100
committerGitHub <noreply@github.com>2020-03-12 16:32:21 +0100
commitd21320cbd910cabb5b3da93a35f9e42c65fbebf8 (patch)
tree670734797aad23a692e08219b2cb1c6e82bdb508 /src/libstd/error.rs
parent39c6405097c4584633841f7fb8bc31dc285c986d (diff)
parent2c90a37969644866d0503c20a94196de3f6bea99 (diff)
downloadrust-d21320cbd910cabb5b3da93a35f9e42c65fbebf8.tar.gz
rust-d21320cbd910cabb5b3da93a35f9e42c65fbebf8.zip
Rollup merge of #69792 - LenaWil:try_reserve_error/impl-error, r=sfackler
Implement Error for TryReserveError

I noticed that the Error trait wasn't implemented for TryReserveError. (#48043)

Not sure if the error messages and code style are 100% correct, it's my first time contributing to the Rust std.
Diffstat (limited to 'src/libstd/error.rs')
-rw-r--r--src/libstd/error.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/error.rs b/src/libstd/error.rs
index 3f6501bc7b4..2a370f19296 100644
--- a/src/libstd/error.rs
+++ b/src/libstd/error.rs
@@ -552,6 +552,9 @@ impl Error for char::ParseCharError {
     }
 }
 
+#[unstable(feature = "try_reserve", reason = "new API", issue = "48043")]
+impl Error for alloc::collections::TryReserveError {}
+
 // Copied from `any.rs`.
 impl dyn Error + 'static {
     /// Returns `true` if the boxed type is the same as `T`