]> git.lizzy.rs Git - rust.git/commitdiff
Remove old stage0 compatibility
authorBrian Anderson <banderson@mozilla.com>
Thu, 18 Aug 2016 17:08:25 +0000 (17:08 +0000)
committerBrian Anderson <banderson@mozilla.com>
Fri, 19 Aug 2016 20:26:10 +0000 (20:26 +0000)
src/libcore/cmp.rs
src/libcore/fmt/mod.rs
src/libcore/lib.rs
src/libpanic_unwind/gcc.rs
src/libpanic_unwind/seh64_gnu.rs

index bb7c971111853e2b612158d4a772835f5cbc7b8a..9bba6cd38e5567d9611d4f84affb00e4049f653b 100644 (file)
@@ -699,38 +699,29 @@ fn cmp(&self, other: &bool) -> Ordering {
 
     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
 
index dbd715c722e13ebd4111aeb53ef2af8d70b2276a..7688da971eb1dde87c2bb8409d13a2f2030535a9 100644 (file)
@@ -1363,28 +1363,19 @@ fn fmt(&self, f: &mut Formatter) -> Result { $tr::fmt(&**self, f) }
 
 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 {
index 2a9678203e17805004d88aa07e4b1773810bda01..fbeddf26b939a4014dddf8e527d6d5f365bf5f5b 100644 (file)
@@ -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;
index fdae8f69a9c0ef31f49fca61b919c7e17cfa0244..bd0c2f5126d133c4965963dfb450c80bbcd314ea 100644 (file)
@@ -264,30 +264,6 @@ unsafe fn find_eh_action(context: *mut uw::_Unwind_Context) -> EHAction {
     eh::find_eh_action(lsda, &eh_context)
 }
 
-// *** Delete after a new snapshot ***
-#[cfg(all(stage0, any(target_os = "ios", not(target_arch = "arm"))))]
-#[lang = "eh_personality_catch"]
-#[no_mangle]
-pub unsafe extern "C" fn rust_eh_personality_catch(version: c_int,
-                                                    actions: uw::_Unwind_Action,
-                                                    exception_class: uw::_Unwind_Exception_Class,
-                                                    ue_header: *mut uw::_Unwind_Exception,
-                                                    context: *mut uw::_Unwind_Context)
-                                                    -> uw::_Unwind_Reason_Code {
-    rust_eh_personality(version, actions, exception_class, ue_header, context)
-}
-
-// *** Delete after a new snapshot ***
-#[cfg(all(stage0, target_arch = "arm", not(target_os = "ios")))]
-#[lang = "eh_personality_catch"]
-#[no_mangle]
-pub unsafe extern "C" fn rust_eh_personality_catch(state: uw::_Unwind_State,
-                                                    ue_header: *mut uw::_Unwind_Exception,
-                                                    context: *mut uw::_Unwind_Context)
-                                                    -> uw::_Unwind_Reason_Code {
-    rust_eh_personality(state, ue_header, context)
-}
-
 // See docs in the `unwind` module.
 #[cfg(all(target_os="windows", target_arch = "x86", target_env="gnu"))]
 #[lang = "eh_unwind_resume"]
index 3642e2488958e921fa8b1efd6a514858873a5de8..e6d3920b29cb0106da0f6e02a0ec5c09561a0929 100644 (file)
@@ -81,21 +81,6 @@ pub unsafe fn cleanup(ptr: *mut u8) -> Box<Any + Send> {
 // This is considered acceptable, because the behavior of throwing exceptions
 // through a C ABI boundary is undefined.
 
-// *** Delete after a new snapshot ***
-#[cfg(stage0)]
-#[lang = "eh_personality_catch"]
-#[cfg(not(test))]
-unsafe extern "C" fn rust_eh_personality_catch(exceptionRecord: *mut c::EXCEPTION_RECORD,
-                                               establisherFrame: c::LPVOID,
-                                               contextRecord: *mut c::CONTEXT,
-                                               dispatcherContext: *mut c::DISPATCHER_CONTEXT)
-                                               -> c::EXCEPTION_DISPOSITION {
-    rust_eh_personality(exceptionRecord,
-                        establisherFrame,
-                        contextRecord,
-                        dispatcherContext)
-}
-
 #[lang = "eh_personality"]
 #[cfg(not(test))]
 unsafe extern "C" fn rust_eh_personality(exceptionRecord: *mut c::EXCEPTION_RECORD,