diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-05-29 15:06:48 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-29 15:06:48 +0900 |
| commit | a08a03ced7909d2a8d6e6df1005b6acda7f10bf4 (patch) | |
| tree | f6dbdae1f21c98b54690ccb24a76291d38267edd /src/libstd/error.rs | |
| parent | 255c0338dc0b02f833fb1a816d76febd50c399c4 (diff) | |
| parent | ef485c6fa97a562b0bc559ffbe38fee9bf1f745b (diff) | |
| download | rust-a08a03ced7909d2a8d6e6df1005b6acda7f10bf4.tar.gz rust-a08a03ced7909d2a8d6e6df1005b6acda7f10bf4.zip | |
Rollup merge of #71633 - a1phyr:infallible_error, r=dtolnay
Impl Error for Infallible This PR only changes the place where `impl Error for Infallible` is documented, as one could think that it is not the case when reading https://doc.rust-lang.org/nightly/std/convert/enum.Infallible.html. Fixes #70842
Diffstat (limited to 'src/libstd/error.rs')
| -rw-r--r-- | src/libstd/error.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/error.rs b/src/libstd/error.rs index 24b57f12e8d..3b4cb859dd4 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -14,6 +14,7 @@ // reconsider what crate these items belong in. use core::array; +use core::convert::Infallible; use crate::alloc::{AllocErr, LayoutErr}; use crate::any::TypeId; @@ -474,7 +475,7 @@ impl Error for string::FromUtf16Error { } #[stable(feature = "str_parse_error2", since = "1.8.0")] -impl Error for string::ParseError { +impl Error for Infallible { fn description(&self) -> &str { match *self {} } |
