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
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 {
#![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)]
#![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;
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"]
// 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,