about summary refs log tree commit diff
path: root/library/panic_unwind/src
diff options
context:
space:
mode:
authorObei Sideg <obei.sideg@gmail.com>2023-12-22 15:12:01 +0300
committerObei Sideg <obei.sideg@gmail.com>2024-01-07 17:29:25 +0300
commita8aa6878f63e53a9b0cfee542e9765407e1ca0d6 (patch)
treebeffa149b8d74a34ca8461831ee1222ec4def133 /library/panic_unwind/src
parent18edf9a64e8d84e72a6be67df3822e57dea8d34a (diff)
downloadrust-a8aa6878f63e53a9b0cfee542e9765407e1ca0d6.tar.gz
rust-a8aa6878f63e53a9b0cfee542e9765407e1ca0d6.zip
Update test for `E0796` and `static_mut_ref` lint
Diffstat (limited to 'library/panic_unwind/src')
-rw-r--r--library/panic_unwind/src/seh.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/panic_unwind/src/seh.rs b/library/panic_unwind/src/seh.rs
index 99db00e5490..ccae406cc28 100644
--- a/library/panic_unwind/src/seh.rs
+++ b/library/panic_unwind/src/seh.rs
@@ -261,6 +261,8 @@ cfg_if::cfg_if! {
    }
 }
 
+// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
+#[cfg_attr(not(bootstrap), allow(static_mut_ref))]
 pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 {
     use core::intrinsics::atomic_store_seqcst;
 
@@ -322,6 +324,8 @@ pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 {
     _CxxThrowException(throw_ptr, &mut THROW_INFO as *mut _ as *mut _);
 }
 
+// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
+#[cfg_attr(not(bootstrap), allow(static_mut_ref))]
 pub unsafe fn cleanup(payload: *mut u8) -> Box<dyn Any + Send> {
     // A null payload here means that we got here from the catch (...) of
     // __rust_try. This happens when a non-Rust foreign exception is caught.