From d4e44a63910c0e2d06c54534538b4a6e41348556 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Mon, 11 Apr 2022 14:06:18 +0200 Subject: [PATCH] Add missing unsafe marker. This is now necessary because of deny(unsafe_op_in_unsafe_fn). --- library/std/src/thread/local.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.