Skip to content

Commit

Permalink
impl std::error::Error for convert::Infallible.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmycuadra committed Sep 22, 2017
1 parent 5f6de3d commit 9562981
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/libstd/error.rs
Expand Up @@ -55,6 +55,7 @@ use alloc::allocator;
use any::TypeId;
use cell;
use char;
use convert;
use fmt::{self, Debug, Display};
use mem::transmute;
use num;
Expand Down Expand Up @@ -347,6 +348,12 @@ impl Error for char::ParseCharError {
}
}

#[unstable(feature = "try_from", issue = "33417")]
impl Error for convert::Infallible {
fn description(&self) -> &str {
"an error of this type can never exist"
}
}

// copied from any.rs
impl Error + 'static {
Expand Down

0 comments on commit 9562981

Please sign in to comment.