about summary refs log tree commit diff
path: root/library/panic_unwind
diff options
context:
space:
mode:
authorObei Sideg <obei.sideg@gmail.com>2024-02-17 22:01:56 +0300
committerObei Sideg <obei.sideg@gmail.com>2024-02-18 06:01:40 +0300
commit408eeae59d35cbcaab2cfb345d24373954e74fc5 (patch)
tree96f35aa95f6fba769db2c292965e8a7ec9c09498 /library/panic_unwind
parenteeeb021954e30a6b16fc12cc4b8a1bcf7910a40e (diff)
Improve wording of static_mut_ref
Rename `static_mut_ref` lint to `static_mut_refs`.
Diffstat (limited to 'library/panic_unwind')
-rw-r--r--library/panic_unwind/src/seh.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/library/panic_unwind/src/seh.rs b/library/panic_unwind/src/seh.rs
index d3ba546d730..c4f4d2fbec9 100644
--- a/library/panic_unwind/src/seh.rs
+++ b/library/panic_unwind/src/seh.rs
@@ -261,8 +261,9 @@ cfg_if::cfg_if! {
    }
 }
 
-// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
-#[allow(static_mut_ref)]
+// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_refs` lint
+#[cfg_attr(bootstrap, allow(static_mut_ref))]
+#[cfg_attr(not(bootstrap), allow(static_mut_refs))]
 pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 {
     use core::intrinsics::atomic_store_seqcst;
 
@@ -324,8 +325,9 @@ 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
-#[allow(static_mut_ref)]
+// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_refs` lint
+#[cfg_attr(bootstrap, allow(static_mut_ref))]
+#[cfg_attr(not(bootstrap), allow(static_mut_refs))]
 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.