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
1 changed files with 1 additions and 1 deletions
|
@ -217,7 +217,7 @@ macro_rules! __thread_local_inner {
|
|||
// 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 a new issue