about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-08-22 20:51:54 -0700
committerGitHub <noreply@github.com>2016-08-22 20:51:54 -0700
commit599f1b96b19c2a67b1e854a64e0cd43af3de164d (patch)
treeee510c9f3483653fce5e2a3af263642995215481 /src/libcore
parentd0da7f6af9d8547376d9497042eb3f4e6013776d (diff)
parent144cc7285f44fca41fc5c336e0942acadac1019d (diff)
downloadrust-599f1b96b19c2a67b1e854a64e0cd43af3de164d.tar.gz
rust-599f1b96b19c2a67b1e854a64e0cd43af3de164d.zip
Auto merge of #35766 - brson:bump, r=alexcrichton
Upgrade bootstrap compiler to 1.12

r? @alexcrichton
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/cmp.rs45
-rw-r--r--src/libcore/fmt/mod.rs29
-rw-r--r--src/libcore/lib.rs6
3 files changed, 29 insertions, 51 deletions
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs
index bb7c9711118..9bba6cd38e5 100644
--- a/src/libcore/cmp.rs
+++ b/src/libcore/cmp.rs
@@ -699,38 +699,29 @@ mod impls {
 
     ord_impl! { char usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
 
-    // Note: This macro is a temporary hack that can be remove once we are building with a compiler
-    // that supports `!`
-    macro_rules! not_stage0 {
-        () => {
-            #[unstable(feature = "never_type", issue = "35121")]
-            impl PartialEq for ! {
-                fn eq(&self, _: &!) -> bool {
-                    *self
-                }
-            }
+    #[unstable(feature = "never_type", issue = "35121")]
+    impl PartialEq for ! {
+        fn eq(&self, _: &!) -> bool {
+            *self
+        }
+    }
 
-            #[unstable(feature = "never_type", issue = "35121")]
-            impl Eq for ! {}
+    #[unstable(feature = "never_type", issue = "35121")]
+    impl Eq for ! {}
 
-            #[unstable(feature = "never_type", issue = "35121")]
-            impl PartialOrd for ! {
-                fn partial_cmp(&self, _: &!) -> Option<Ordering> {
-                    *self
-                }
-            }
-
-            #[unstable(feature = "never_type", issue = "35121")]
-            impl Ord for ! {
-                fn cmp(&self, _: &!) -> Ordering {
-                    *self
-                }
-            }
+    #[unstable(feature = "never_type", issue = "35121")]
+    impl PartialOrd for ! {
+        fn partial_cmp(&self, _: &!) -> Option<Ordering> {
+            *self
         }
     }
 
-    #[cfg(not(stage0))]
-    not_stage0!();
+    #[unstable(feature = "never_type", issue = "35121")]
+    impl Ord for ! {
+        fn cmp(&self, _: &!) -> Ordering {
+            *self
+        }
+    }
 
     // & pointers
 
diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs
index dbd715c722e..7688da971eb 100644
--- a/src/libcore/fmt/mod.rs
+++ b/src/libcore/fmt/mod.rs
@@ -1363,28 +1363,19 @@ macro_rules! fmt_refs {
 
 fmt_refs! { Debug, Display, Octal, Binary, LowerHex, UpperHex, LowerExp, UpperExp }
 
-// Note: This macro is a temporary hack that can be remove once we are building with a compiler
-// that supports `!`
-macro_rules! not_stage0 {
-    () => {
-        #[unstable(feature = "never_type", issue = "35121")]
-        impl Debug for ! {
-            fn fmt(&self, _: &mut Formatter) -> Result {
-                *self
-            }
-        }
-
-        #[unstable(feature = "never_type", issue = "35121")]
-        impl Display for ! {
-            fn fmt(&self, _: &mut Formatter) -> Result {
-                *self
-            }
-        }
+#[unstable(feature = "never_type", issue = "35121")]
+impl Debug for ! {
+    fn fmt(&self, _: &mut Formatter) -> Result {
+        *self
     }
 }
 
-#[cfg(not(stage0))]
-not_stage0!();
+#[unstable(feature = "never_type", issue = "35121")]
+impl Display for ! {
+    fn fmt(&self, _: &mut Formatter) -> Result {
+        *self
+    }
+}
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl Debug for bool {
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 2a9678203e1..fbeddf26b93 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -67,8 +67,6 @@
 #![deny(missing_debug_implementations)]
 #![cfg_attr(not(stage0), deny(warnings))]
 
-#![cfg_attr(stage0, allow(unused_attributes))]
-
 #![feature(allow_internal_unstable)]
 #![feature(asm)]
 #![feature(associated_type_defaults)]
@@ -92,9 +90,7 @@
 #![feature(staged_api)]
 #![feature(unboxed_closures)]
 #![feature(question_mark)]
-
-// NOTE: remove the cfg_attr next snapshot
-#![cfg_attr(not(stage0), feature(never_type))]
+#![feature(never_type)]
 
 #[macro_use]
 mod macros;