File tree Expand file tree Collapse file tree 5 files changed +12
-0
lines changed Expand file tree Collapse file tree 5 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -261,6 +261,8 @@ cfg_if::cfg_if! {
261
261
}
262
262
}
263
263
264
+ // FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
265
+ #[ cfg_attr( not( bootstrap) , allow( static_mut_ref) ) ]
264
266
pub unsafe fn panic ( data : Box < dyn Any + Send > ) -> u32 {
265
267
use core:: intrinsics:: atomic_store_seqcst;
266
268
@@ -322,6 +324,8 @@ pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 {
322
324
_CxxThrowException ( throw_ptr, & mut THROW_INFO as * mut _ as * mut _ ) ;
323
325
}
324
326
327
+ // FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
328
+ #[ cfg_attr( not( bootstrap) , allow( static_mut_ref) ) ]
325
329
pub unsafe fn cleanup ( payload : * mut u8 ) -> Box < dyn Any + Send > {
326
330
// A null payload here means that we got here from the catch (...) of
327
331
// __rust_try. This happens when a non-Rust foreign exception is caught.
Original file line number Diff line number Diff line change @@ -337,6 +337,8 @@ pub mod panic_count {
337
337
#[ doc( hidden) ]
338
338
#[ cfg( not( feature = "panic_immediate_abort" ) ) ]
339
339
#[ unstable( feature = "update_panic_count" , issue = "none" ) ]
340
+ // FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
341
+ #[ cfg_attr( not( bootstrap) , allow( static_mut_ref) ) ]
340
342
pub mod panic_count {
341
343
use crate :: cell:: Cell ;
342
344
use crate :: sync:: atomic:: { AtomicUsize , Ordering } ;
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ pub macro thread_local_inner {
13
13
( @key $t: ty, const $init: expr) => { {
14
14
#[ inline]
15
15
#[ deny( unsafe_op_in_unsafe_fn) ]
16
+ // FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
17
+ #[ cfg_attr( not( bootstrap) , allow( static_mut_ref) ) ]
16
18
unsafe fn __getit (
17
19
_init : $crate:: option:: Option < & mut $crate:: option:: Option < $t> > ,
18
20
) -> $crate:: option:: Option < & ' static $t> {
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ pub macro thread_local_inner {
11
11
( @key $t: ty, const $init: expr) => { {
12
12
#[ inline] // see comments below
13
13
#[ deny( unsafe_op_in_unsafe_fn) ]
14
+ // FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
15
+ #[ cfg_attr( not( bootstrap) , allow( static_mut_ref) ) ]
14
16
unsafe fn __getit (
15
17
_init : $crate:: option:: Option < & mut $crate:: option:: Option < $t> > ,
16
18
) -> $crate:: option:: Option < & ' static $t> {
Original file line number Diff line number Diff line change @@ -180,6 +180,8 @@ impl<T: 'static> fmt::Debug for LocalKey<T> {
180
180
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
181
181
#[ cfg_attr( not( test) , rustc_diagnostic_item = "thread_local_macro" ) ]
182
182
#[ allow_internal_unstable( thread_local_internals) ]
183
+ // FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
184
+ #[ cfg_attr( not( bootstrap) , allow( static_mut_ref) ) ]
183
185
macro_rules! thread_local {
184
186
// empty (base case for the recursion)
185
187
( ) => { } ;
You can’t perform that action at this time.
0 commit comments