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.
|
// so now.
|
||||||
0 => {
|
0 => {
|
||||||
$crate::thread::__FastLocalKeyInner::<$t>::register_dtor(
|
$crate::thread::__FastLocalKeyInner::<$t>::register_dtor(
|
||||||
&VAL as *const _ as *mut u8,
|
$crate::ptr::addr_of_mut!(VAL) as *mut u8,
|
||||||
destroy,
|
destroy,
|
||||||
);
|
);
|
||||||
STATE = 1;
|
STATE = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue