diff options
| author | Andrew Cann <shum@canndrew.org> | 2018-03-15 14:14:48 +0800 |
|---|---|---|
| committer | Andrew Cann <shum@canndrew.org> | 2018-03-16 23:38:36 +0800 |
| commit | 15bab452f30ce6cb67a849f13e9de80586a8b180 (patch) | |
| tree | b73d1fa5a9807fb3050cbb3805c42c957fe7f7cb | |
| parent | 4647156985404f07dc2e61eed6f2e24770b339a9 (diff) | |
| download | rust-15bab452f30ce6cb67a849f13e9de80586a8b180.tar.gz rust-15bab452f30ce6cb67a849f13e9de80586a8b180.zip | |
Add From<!> for TryFromIntError
| -rw-r--r-- | src/libcore/num/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index faeb87cf944..4583e45bb12 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),*) => {$( |
