Impl Error for Infallible

This commit is contained in:
Benoît du Garreau 2020-04-07 14:51:47 +02:00
parent fb5615a477
commit ef485c6fa9

View file

@ -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 {}
}