diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-03-19 20:51:11 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-19 20:51:11 -0400 |
| commit | 4e9033124b781f0d54de50fe47bb4cc2331940e5 (patch) | |
| tree | 301b5987570ae0d3c7533ffa61c13614b4d05648 /src/libstd/error.rs | |
| parent | dedf9d3593632faea7ccb2f78bd6517ce56bb06d (diff) | |
| parent | a5cf55125c9e5d36547a31f2ff0f028cc51b4855 (diff) | |
| download | rust-4e9033124b781f0d54de50fe47bb4cc2331940e5.tar.gz rust-4e9033124b781f0d54de50fe47bb4cc2331940e5.zip | |
Rollup merge of #40566 - clarcharr:never_error, r=sfackler
Implement std::error::Error for !.
Diffstat (limited to 'src/libstd/error.rs')
| -rw-r--r-- | src/libstd/error.rs | 5 |
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" } |
