diff options
Diffstat (limited to 'src/libstd/sys/common')
| -rw-r--r-- | src/libstd/sys/common/poison.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/common/unwind/gcc.rs | 1 | ||||
| -rw-r--r-- | src/libstd/sys/common/unwind/mod.rs | 17 | ||||
| -rw-r--r-- | src/libstd/sys/common/unwind/seh.rs | 29 | ||||
| -rw-r--r-- | src/libstd/sys/common/unwind/seh64_gnu.rs | 1 |
5 files changed, 1 insertions, 49 deletions
diff --git a/src/libstd/sys/common/poison.rs b/src/libstd/sys/common/poison.rs index d858c002755..83780a31cce 100644 --- a/src/libstd/sys/common/poison.rs +++ b/src/libstd/sys/common/poison.rs @@ -71,7 +71,7 @@ pub enum TryLockError<T> { /// The lock could not be acquired because another thread failed while holding /// the lock. #[stable(feature = "rust1", since = "1.0.0")] - Poisoned(#[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] PoisonError<T>), + Poisoned(#[stable(feature = "rust1", since = "1.0.0")] PoisonError<T>), /// The lock could not be acquired at this time because the operation would /// otherwise block. #[stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libstd/sys/common/unwind/gcc.rs b/src/libstd/sys/common/unwind/gcc.rs index 7cf9e2a54bd..ff6a11951dc 100644 --- a/src/libstd/sys/common/unwind/gcc.rs +++ b/src/libstd/sys/common/unwind/gcc.rs @@ -41,7 +41,6 @@ pub unsafe fn panic(data: Box<Any + Send + 'static>) -> ! { } } -#[cfg(not(stage0))] pub fn payload() -> *mut u8 { 0 as *mut u8 } diff --git a/src/libstd/sys/common/unwind/mod.rs b/src/libstd/sys/common/unwind/mod.rs index d9641e63760..527c2e63030 100644 --- a/src/libstd/sys/common/unwind/mod.rs +++ b/src/libstd/sys/common/unwind/mod.rs @@ -128,7 +128,6 @@ pub unsafe fn try<F: FnOnce()>(f: F) -> Result<(), Box<Any + Send>> { } } -#[cfg(not(stage0))] unsafe fn inner_try(f: fn(*mut u8), data: *mut u8) -> Result<(), Box<Any + Send>> { PANIC_COUNT.with(|s| { @@ -156,22 +155,6 @@ unsafe fn inner_try(f: fn(*mut u8), data: *mut u8) }) } -#[cfg(stage0)] -unsafe fn inner_try(f: fn(*mut u8), data: *mut u8) - -> Result<(), Box<Any + Send>> { - PANIC_COUNT.with(|s| { - let prev = s.get(); - s.set(0); - let ep = intrinsics::try(f, data); - s.set(prev); - if ep.is_null() { - Ok(()) - } else { - Err(imp::cleanup(ep)) - } - }) -} - /// Determines whether the current thread is unwinding because of panic. pub fn panicking() -> bool { PANIC_COUNT.with(|s| s.get() != 0) diff --git a/src/libstd/sys/common/unwind/seh.rs b/src/libstd/sys/common/unwind/seh.rs index f8d3a92b3b6..94da42f0092 100644 --- a/src/libstd/sys/common/unwind/seh.rs +++ b/src/libstd/sys/common/unwind/seh.rs @@ -65,35 +65,6 @@ const RUST_PANIC: c::DWORD = 0x00525354; pub use self::imp::*; -#[cfg(stage0)] -mod imp { - use prelude::v1::*; - use any::Any; - - pub unsafe fn panic(_data: Box<Any + Send + 'static>) -> ! { - rtabort!("cannot unwind SEH in stage0") - } - - pub unsafe fn cleanup(_ptr: *mut u8) -> Box<Any + Send + 'static> { - rtabort!("can't cleanup SEH in stage0") - } - - #[lang = "msvc_try_filter"] - #[linkage = "external"] - unsafe extern fn __rust_try_filter() -> i32 { - 0 - } - - #[lang = "eh_unwind_resume"] - #[unwind] - unsafe extern fn rust_eh_unwind_resume(_ptr: *mut u8) -> ! { - rtabort!("can't resume unwind SEH in stage0") - } - #[lang = "eh_personality_catch"] - unsafe extern fn rust_eh_personality_catch() {} -} - -#[cfg(not(stage0))] mod imp { use prelude::v1::*; diff --git a/src/libstd/sys/common/unwind/seh64_gnu.rs b/src/libstd/sys/common/unwind/seh64_gnu.rs index 8afef081673..57281d67ebb 100644 --- a/src/libstd/sys/common/unwind/seh64_gnu.rs +++ b/src/libstd/sys/common/unwind/seh64_gnu.rs @@ -50,7 +50,6 @@ pub unsafe fn panic(data: Box<Any + Send + 'static>) -> ! { rtabort!("could not unwind stack"); } -#[cfg(not(stage0))] pub fn payload() -> *mut u8 { 0 as *mut u8 } |
