about summary refs log tree commit diff
path: root/src/libstd/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/error.rs')
-rw-r--r--src/libstd/error.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libstd/error.rs b/src/libstd/error.rs
index 660948b0acc..35cd4a5ec52 100644
--- a/src/libstd/error.rs
+++ b/src/libstd/error.rs
@@ -49,13 +49,11 @@
 
 use any::TypeId;
 use boxed::Box;
-use convert::From;
+use char;
 use fmt::{self, Debug, Display};
 use marker::{Send, Sync, Reflect};
 use mem::transmute;
 use num;
-use option::Option::{self, Some, None};
-use result::Result::{self, Ok, Err};
 use raw::TraitObject;
 use str;
 use string::{self, String};
@@ -189,6 +187,13 @@ impl Error for string::ParseError {
     }
 }
 
+#[stable(feature = "decode_utf16", since = "1.9.0")]
+impl Error for char::DecodeUtf16Error {
+    fn description(&self) -> &str {
+        "unpaired surrogate found"
+    }
+}
+
 #[stable(feature = "box_error", since = "1.7.0")]
 impl<T: Error> Error for Box<T> {
     fn description(&self) -> &str {