File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 11//! Ensure that thread-local statics get deallocated when the thread dies.
22
33#![ feature( thread_local) ]
4+ // FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
5+ #![ allow( static_mut_ref) ]
46
57#[ thread_local]
68static mut TLS : u8 = 0 ;
Original file line number Diff line number Diff line change 11static mut FOO : i32 = 42 ;
2+
3+ // FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
4+ #[ allow( static_mut_ref) ]
25static BAR : Foo = Foo ( unsafe { & FOO as * const _ } ) ;
36
47#[ allow( dead_code) ]
Original file line number Diff line number Diff line change 88//! test, we also check that thread-locals act as per-thread statics.
99
1010#![ feature( thread_local) ]
11+ // FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
12+ #![ allow( static_mut_ref) ]
1113
1214use std:: thread;
1315
You can’t perform that action at this time.
0 commit comments