diff options
| author | bors <bors@rust-lang.org> | 2019-12-14 22:02:59 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-12-14 22:02:59 +0000 |
| commit | 6f829840f7e5897745bc7b5ff951b006a2c4e0e3 (patch) | |
| tree | 0c73bcad1ba6245af90566e58a69def359b598cd /src/libstd/error.rs | |
| parent | c8ea4ace9213ae045123fdfeb59d1ac887656d31 (diff) | |
| parent | 775076ff4dc9ce4986a1286669cfa268b01ac592 (diff) | |
| download | rust-6f829840f7e5897745bc7b5ff951b006a2c4e0e3.tar.gz rust-6f829840f7e5897745bc7b5ff951b006a2c4e0e3.zip | |
Auto merge of #67224 - nikomatsakis:revert-stabilization-of-never-type, r=centril
Revert stabilization of never type Fixes https://github.com/rust-lang/rust/issues/66757 I decided to keep the separate `never-type-fallback` feature gate, but tried to otherwise revert https://github.com/rust-lang/rust/pull/65355. Seemed pretty clean. ( cc @Centril, author of #65355, you may want to check this over briefly )
Diffstat (limited to 'src/libstd/error.rs')
| -rw-r--r-- | src/libstd/error.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libstd/error.rs b/src/libstd/error.rs index ec1c444bcf8..d4c4cb9c3b9 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -465,7 +465,7 @@ impl<'a> From<Cow<'a, str>> for Box<dyn Error> { } } -#[stable(feature = "never_type", since = "1.41.0")] +#[unstable(feature = "never_type", issue = "35121")] impl Error for ! { fn description(&self) -> &str { *self } } @@ -551,6 +551,13 @@ impl Error for string::FromUtf16Error { } } +#[stable(feature = "str_parse_error2", since = "1.8.0")] +impl Error for string::ParseError { + fn description(&self) -> &str { + match *self {} + } +} + #[stable(feature = "decode_utf16", since = "1.9.0")] impl Error for char::DecodeUtf16Error { fn description(&self) -> &str { |
