File tree 3 files changed +7
-0
lines changed
3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 1
1
//! Ensure that thread-local statics get deallocated when the thread dies.
2
2
3
3
#![ feature( thread_local) ]
4
+ // FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
5
+ #![ allow( static_mut_ref) ]
4
6
5
7
#[ thread_local]
6
8
static mut TLS : u8 = 0 ;
Original file line number Diff line number Diff line change 1
1
static mut FOO : i32 = 42 ;
2
+
3
+ // FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
4
+ #[ allow( static_mut_ref) ]
2
5
static BAR : Foo = Foo ( unsafe { & FOO as * const _ } ) ;
3
6
4
7
#[ allow( dead_code) ]
Original file line number Diff line number Diff line change 8
8
//! test, we also check that thread-locals act as per-thread statics.
9
9
10
10
#![ feature( thread_local) ]
11
+ // FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
12
+ #![ allow( static_mut_ref) ]
11
13
12
14
use std:: thread;
13
15
You can’t perform that action at this time.
0 commit comments