Skip to content

Commit

Permalink
Rollup merge of #71633 - a1phyr:infallible_error, r=dtolnay
Browse files Browse the repository at this point in the history
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
  • Loading branch information
JohnTitor committed May 29, 2020
2 parents 255c033 + ef485c6 commit a08a03c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libstd/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {}
}
Expand Down

0 comments on commit a08a03c

Please sign in to comment.