about summary refs log tree commit diff
path: root/src/libstd/error.rs
diff options
context:
space:
mode:
authorJimmy Cuadra <jimmy@jimmycuadra.com>2017-09-23 17:08:16 -0700
committerJimmy Cuadra <jimmy@jimmycuadra.com>2017-09-23 17:27:02 -0700
commit4d2a8c527880a56db3b410450fa2b6cbf0cbe3a8 (patch)
tree3873c744e21e31a23530a42e6fdedca0c4c62135 /src/libstd/error.rs
parent79f2439aa698c7eefa089ad05027826d7911780f (diff)
downloadrust-4d2a8c527880a56db3b410450fa2b6cbf0cbe3a8.tar.gz
rust-4d2a8c527880a56db3b410450fa2b6cbf0cbe3a8.zip
Simplify implementation of Display and Error for convert::Infallible.
Diffstat (limited to 'src/libstd/error.rs')
-rw-r--r--src/libstd/error.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/error.rs b/src/libstd/error.rs
index 5cb2b00334d..6a4de4ecbff 100644
--- a/src/libstd/error.rs
+++ b/src/libstd/error.rs
@@ -351,7 +351,8 @@ impl Error for char::ParseCharError {
 #[unstable(feature = "try_from", issue = "33417")]
 impl Error for convert::Infallible {
     fn description(&self) -> &str {
-        "an error of this type can never exist"
+        match *self {
+        }
     }
 }