Rollup merge of #84291 - RalfJung:thread-local-const-init, r=alexcrichton
fix aliasing violations in thread_local_const_init Fixes https://github.com/rust-lang/rust/pull/83416#discussion_r615364774 r? `@alexcrichton` `@sfackler`
This commit is contained in:
commit
761243572e
@ -217,7 +217,7 @@ unsafe fn __getit() -> $crate::option::Option<&'static $t> {
|
||||
// so now.
|
||||
0 => {
|
||||
$crate::thread::__FastLocalKeyInner::<$t>::register_dtor(
|
||||
&VAL as *const _ as *mut u8,
|
||||
$crate::ptr::addr_of_mut!(VAL) as *mut u8,
|
||||
destroy,
|
||||
);
|
||||
STATE = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user