diff options
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/panicking.rs | 20 | ||||
| -rw-r--r-- | src/libstd/sync/mpsc/shared.rs | 6 | ||||
| -rw-r--r-- | src/libstd/sync/mpsc/sync.rs | 6 | ||||
| -rw-r--r-- | src/libstd/sys/cloudabi/mod.rs | 5 | ||||
| -rw-r--r-- | src/libstd/sys/windows/mod.rs | 5 |
5 files changed, 8 insertions, 34 deletions
diff --git a/src/libstd/panicking.rs b/src/libstd/panicking.rs index bf381896a22..6a120f930ab 100644 --- a/src/libstd/panicking.rs +++ b/src/libstd/panicking.rs @@ -332,10 +332,7 @@ pub fn panicking() -> bool { #[cfg_attr(feature = "panic_immediate_abort", inline)] pub fn begin_panic_fmt(msg: &fmt::Arguments<'_>) -> ! { if cfg!(feature = "panic_immediate_abort") { - #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // remove `unsafe` on bootstrap bump - unsafe { - intrinsics::abort() - } + intrinsics::abort() } let info = PanicInfo::internal_constructor(Some(msg), Location::caller()); @@ -401,10 +398,7 @@ pub fn begin_panic_handler(info: &PanicInfo<'_>) -> ! { #[track_caller] pub fn begin_panic<M: Any + Send>(msg: M) -> ! { if cfg!(feature = "panic_immediate_abort") { - #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // remove `unsafe` on bootstrap bump - unsafe { - intrinsics::abort() - } + intrinsics::abort() } rust_panic_with_hook(&mut PanicPayload::new(msg), None, Location::caller()); @@ -464,10 +458,7 @@ fn rust_panic_with_hook( "thread panicked while processing \ panic. aborting.\n" )); - #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // remove `unsafe` on bootstrap bump - unsafe { - intrinsics::abort() - } + intrinsics::abort() } unsafe { @@ -502,10 +493,7 @@ fn rust_panic_with_hook( "thread panicked while panicking. \ aborting.\n" )); - #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // remove `unsafe` on bootstrap bump - unsafe { - intrinsics::abort() - } + intrinsics::abort() } rust_panic(payload) diff --git a/src/libstd/sync/mpsc/shared.rs b/src/libstd/sync/mpsc/shared.rs index d1a46c51757..898654f21f2 100644 --- a/src/libstd/sync/mpsc/shared.rs +++ b/src/libstd/sync/mpsc/shared.rs @@ -354,11 +354,7 @@ impl<T> Packet<T> { // See comments on Arc::clone() on why we do this (for `mem::forget`). if old_count > MAX_REFCOUNT { - // remove `unsafe` on bootstrap bump - #[cfg_attr(not(bootstrap), allow(unused_unsafe))] - unsafe { - abort(); - } + abort(); } } diff --git a/src/libstd/sync/mpsc/sync.rs b/src/libstd/sync/mpsc/sync.rs index 603764922c5..733761671a0 100644 --- a/src/libstd/sync/mpsc/sync.rs +++ b/src/libstd/sync/mpsc/sync.rs @@ -358,11 +358,7 @@ impl<T> Packet<T> { // See comments on Arc::clone() on why we do this (for `mem::forget`). if old_count > MAX_REFCOUNT { - // remove `unsafe` on bootstrap bump - #[cfg_attr(not(bootstrap), allow(unused_unsafe))] - unsafe { - abort(); - } + abort(); } } diff --git a/src/libstd/sys/cloudabi/mod.rs b/src/libstd/sys/cloudabi/mod.rs index dde2b21c9bc..8dbc31472d6 100644 --- a/src/libstd/sys/cloudabi/mod.rs +++ b/src/libstd/sys/cloudabi/mod.rs @@ -52,10 +52,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind { } pub fn abort_internal() -> ! { - #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // remove `unsafe` on bootstrap bump - unsafe { - core::intrinsics::abort(); - } + core::intrinsics::abort(); } pub use libc::strlen; diff --git a/src/libstd/sys/windows/mod.rs b/src/libstd/sys/windows/mod.rs index 4098c6b3ee9..69877e68ba8 100644 --- a/src/libstd/sys/windows/mod.rs +++ b/src/libstd/sys/windows/mod.rs @@ -314,8 +314,5 @@ pub fn abort_internal() -> ! { llvm_asm!("int $$0x29" :: "{ecx}"(7) ::: volatile); // 7 is FAST_FAIL_FATAL_APP_EXIT crate::intrinsics::unreachable(); } - #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // remove `unsafe` on bootstrap bump - unsafe { - crate::intrinsics::abort(); - } + crate::intrinsics::abort(); } |
