summary refs log tree commit diff
path: root/src/libstd/error.rs
diff options
context:
space:
mode:
authorClar Charr <clar@charr.xyz>2017-03-15 23:07:28 -0400
committerClar Charr <clar@charr.xyz>2017-03-15 23:09:29 -0400
commita5cf55125c9e5d36547a31f2ff0f028cc51b4855 (patch)
treea9d89d39c4899d8bd7483d0d8b4ce0b29f792cac /src/libstd/error.rs
parent11a33760ecfd925be089a28c54f12a5490fd9a2f (diff)
downloadrust-a5cf55125c9e5d36547a31f2ff0f028cc51b4855.tar.gz
rust-a5cf55125c9e5d36547a31f2ff0f028cc51b4855.zip
Implement Error for !.
Diffstat (limited to 'src/libstd/error.rs')
-rw-r--r--src/libstd/error.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstd/error.rs b/src/libstd/error.rs
index e115263d2eb..3d80120f6b2 100644
--- a/src/libstd/error.rs
+++ b/src/libstd/error.rs
@@ -216,6 +216,11 @@ impl<'a> From<&'a str> for Box<Error> {
     }
 }
 
+#[stable(feature = "never_error", since = "1.18.0")]
+impl Error for ! {
+    fn description(&self) -> &str { *self }
+}
+
 #[stable(feature = "rust1", since = "1.0.0")]
 impl Error for str::ParseBoolError {
     fn description(&self) -> &str { "failed to parse bool" }