about summary refs log tree commit diff
path: root/library/std/src/thread
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2022-04-11 14:06:18 +0200
committerMara Bos <m-ou.se@m-ou.se>2022-04-12 08:44:39 +0200
commitd4e44a63910c0e2d06c54534538b4a6e41348556 (patch)
treea4c901aa44def157724b076b50b82ba218501a91 /library/std/src/thread
parent8a2c9a96159fcca6d35efb94b900d8be79395ea9 (diff)
downloadrust-d4e44a63910c0e2d06c54534538b4a6e41348556.tar.gz
rust-d4e44a63910c0e2d06c54534538b4a6e41348556.zip
Add missing unsafe marker.
This is now necessary because of deny(unsafe_op_in_unsafe_fn).
Diffstat (limited to 'library/std/src/thread')
-rw-r--r--library/std/src/thread/local.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/thread/local.rs b/library/std/src/thread/local.rs
index 99baca66df0..047d07ad57d 100644
--- a/library/std/src/thread/local.rs
+++ b/library/std/src/thread/local.rs
@@ -194,7 +194,7 @@ macro_rules! __thread_local_inner {
             #[cfg(all(target_family = "wasm", not(target_feature = "atomics")))]
             {
                 static mut VAL: $t = INIT_EXPR;
-                $crate::option::Option::Some(&VAL)
+                unsafe { $crate::option::Option::Some(&VAL) }
             }
 
             // If the platform has support for `#[thread_local]`, use it.