summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authortinaun <tinagma@gmail.com>2017-05-27 18:12:16 -0400
committertinaun <tinagma@gmail.com>2017-06-20 04:38:02 -0400
commitfd9d7aa2cf76c949633cb4156642654238c03921 (patch)
treed83554665cfdb26dd375b45339968e84f63df82c /src/libstd
parent557967766be6139bd747ab2c3dc56ff0c9b8852a (diff)
downloadrust-fd9d7aa2cf76c949633cb4156642654238c03921.tar.gz
rust-fd9d7aa2cf76c949633cb4156642654238c03921.zip
added `FromStr` Impl for `char`
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/error.rs8
-rw-r--r--src/libstd/lib.rs1
2 files changed, 9 insertions, 0 deletions
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)]