From 15bab452f30ce6cb67a849f13e9de80586a8b180 Mon Sep 17 00:00:00 2001 From: Andrew Cann Date: Thu, 15 Mar 2018 14:14:48 +0800 Subject: [PATCH] Add From for TryFromIntError --- src/libcore/num/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index faeb87cf944c..4583e45bb12e 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -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),*) => {$(