Skip to content

Commit a08a03c

Browse files
authored
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
2 parents 255c033 + ef485c6 commit a08a03c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libstd/error.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// reconsider what crate these items belong in.
1515

1616
use core::array;
17+
use core::convert::Infallible;
1718

1819
use crate::alloc::{AllocErr, LayoutErr};
1920
use crate::any::TypeId;
@@ -474,7 +475,7 @@ impl Error for string::FromUtf16Error {
474475
}
475476

476477
#[stable(feature = "str_parse_error2", since = "1.8.0")]
477-
impl Error for string::ParseError {
478+
impl Error for Infallible {
478479
fn description(&self) -> &str {
479480
match *self {}
480481
}

0 commit comments

Comments
 (0)