From fd9d7aa2cf76c949633cb4156642654238c03921 Mon Sep 17 00:00:00 2001 From: tinaun Date: Sat, 27 May 2017 18:12:16 -0400 Subject: added `FromStr` Impl for `char` --- src/libstd/error.rs | 8 ++++++++ src/libstd/lib.rs | 1 + 2 files changed, 9 insertions(+) (limited to 'src/libstd') diff --git a/src/libstd/error.rs b/src/libstd/error.rs index f56e3a5d780..47f96cabe15 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -321,6 +321,14 @@ impl Error for char::CharTryFromError { } } +#[stable(feature = "char_from_str", since = "1.19.0")] +impl Error for char::ParseCharError { + fn description(&self) -> &str { + self.__description() + } +} + + // copied from any.rs impl Error + 'static { /// Returns true if the boxed type is the same as `T` diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index b0820d6f05a..4e825a69321 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -253,6 +253,7 @@ #![feature(cfg_target_thread_local)] #![feature(cfg_target_vendor)] #![feature(char_escape_debug)] +#![feature(char_error_internals)] #![feature(char_internals)] #![feature(collections)] #![feature(collections_range)] -- cgit 1.4.1-3-g733a5