about summary refs log tree commit diff
path: root/src/libcore/num/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-11-21 14:30:02 +0000
committerbors <bors@rust-lang.org>2019-11-21 14:30:02 +0000
commit35ef33a89dfd8ff8c8a7b3c58fa7136bbcb2f1ed (patch)
tree198a52d838a5a90eee1de769a634e6e19c077914 /src/libcore/num/mod.rs
parentf1b882b55805c342e46ee4ca3beeef1d1fa2044b (diff)
parent5ab2bccbcdd48c7055eb77e348486d0bda283a1f (diff)
downloadrust-35ef33a89dfd8ff8c8a7b3c58fa7136bbcb2f1ed.tar.gz
rust-35ef33a89dfd8ff8c8a7b3c58fa7136bbcb2f1ed.zip
Auto merge of #66607 - Centril:rollup-yb7cl73, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #65355 (Stabilize `!` in Rust 1.41.0)
 - #65730 (Suggest to add lifetime constraint at explicit ouput of functions)
 - #66468 (Cleanup Miri SIMD intrinsics)
 - #66515 (Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`)
 - #66602 (Revert "Update Source Code Pro and include italics")

Failed merges:

r? @ghost
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 {}
     }
 }