about summary refs log tree commit diff
path: root/src/libcore/num/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/num/mod.rs')
-rw-r--r--src/libcore/num/mod.rs12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
index b5d61a3fd4e..4313248f263 100644
--- a/src/libcore/num/mod.rs
+++ b/src/libcore/num/mod.rs
@@ -4,7 +4,7 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
-use crate::convert::{TryFrom, Infallible};
+use crate::convert::TryFrom;
 use crate::fmt;
 use crate::intrinsics;
 use crate::mem;
@@ -4722,18 +4722,8 @@ impl fmt::Display for TryFromIntError {
 }
 
 #[stable(feature = "try_from", since = "1.34.0")]
-impl From<Infallible> for TryFromIntError {
-    fn from(x: Infallible) -> TryFromIntError {
-        match x {}
-    }
-}
-
-#[unstable(feature = "never_type", issue = "35121")]
 impl From<!> for TryFromIntError {
     fn from(never: !) -> TryFromIntError {
-        // Match rather than coerce to make sure that code like
-        // `From<Infallible> for TryFromIntError` above will keep working
-        // when `Infallible` becomes an alias to `!`.
         match never {}
     }
 }