Skip to content

Commit

Permalink
Add From<!> for TryFromIntError
Browse files Browse the repository at this point in the history
  • Loading branch information
canndrew committed Mar 16, 2018
1 parent 4647156 commit 15bab45
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3595,6 +3595,13 @@ impl fmt::Display for TryFromIntError {
}
}

#[unstable(feature = "try_from", issue = "33417")]
impl From<!> for TryFromIntError {
fn from(never: !) -> TryFromIntError {
never
}
}

// no possible bounds violation
macro_rules! try_from_unbounded {
($source:ty, $($target:ty),*) => {$(
Expand Down

0 comments on commit 15bab45

Please sign in to comment.