diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-03-11 12:55:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-11 12:55:43 +0100 |
| commit | 5e52ada714a46b6150e78c7c5a2ff7178a2d79d3 (patch) | |
| tree | 26f5009e610ecdb566eb26e05ea84957b0ecc643 /tests | |
| parent | 25794194fa2bd25221411c08f6b3e33f13e9ec74 (diff) | |
| parent | 5828910ff4ea90eb2092074dd641d36f0146a734 (diff) | |
| download | rust-5e52ada714a46b6150e78c7c5a2ff7178a2d79d3.tar.gz rust-5e52ada714a46b6150e78c7c5a2ff7178a2d79d3.zip | |
Rollup merge of #108927 - Ayush1325:pal-cleanup, r=workingjubilee
Move __thread_local_inner to sys Move `__thread_local_inner` macro in `crate::thread::local` to `crate::sys`. Initially, I was thinking about removing this macro completely, but I could not find a way to create the generic statics without macros, so in the end, I just moved to code around. This probably will need a rebase once https://github.com/rust-lang/rust/pull/108917 is merged r? ``@workingjubilee``
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/threads-sendsync/issue-43733-2.rs | 2 | ||||
| -rw-r--r-- | tests/ui/threads-sendsync/issue-43733.rs | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/ui/threads-sendsync/issue-43733-2.rs b/tests/ui/threads-sendsync/issue-43733-2.rs index 32baeec4359..8f7a9c08375 100644 --- a/tests/ui/threads-sendsync/issue-43733-2.rs +++ b/tests/ui/threads-sendsync/issue-43733-2.rs @@ -21,7 +21,7 @@ impl<T> Key<T> { } #[cfg(target_thread_local)] -use std::thread::__FastLocalKeyInner as Key; +use std::thread::__LocalKeyInner as Key; static __KEY: Key<()> = Key::new(); //~^ ERROR `UnsafeCell<Option<()>>` cannot be shared between threads diff --git a/tests/ui/threads-sendsync/issue-43733.rs b/tests/ui/threads-sendsync/issue-43733.rs index 935e02944b9..0eadef3e3e8 100644 --- a/tests/ui/threads-sendsync/issue-43733.rs +++ b/tests/ui/threads-sendsync/issue-43733.rs @@ -1,8 +1,8 @@ // ignore-wasm32 // revisions: mir thir // [thir]compile-flags: -Z thir-unsafeck -// normalize-stderr-test: "__FastLocalKeyInner::<T>::get" -> "$$LOCALKEYINNER::<T>::get" -// normalize-stderr-test: "__OsLocalKeyInner::<T>::get" -> "$$LOCALKEYINNER::<T>::get" +// normalize-stderr-test: "__LocalKeyInner::<T>::get" -> "$$LOCALKEYINNER::<T>::get" +// normalize-stderr-test: "__LocalKeyInner::<T>::get" -> "$$LOCALKEYINNER::<T>::get" #![feature(thread_local)] #![feature(cfg_target_thread_local, thread_local_internals)] @@ -12,10 +12,10 @@ type Foo = std::cell::RefCell<String>; #[cfg(target_thread_local)] #[thread_local] -static __KEY: std::thread::__FastLocalKeyInner<Foo> = std::thread::__FastLocalKeyInner::new(); +static __KEY: std::thread::__LocalKeyInner<Foo> = std::thread::__LocalKeyInner::new(); #[cfg(not(target_thread_local))] -static __KEY: std::thread::__OsLocalKeyInner<Foo> = std::thread::__OsLocalKeyInner::new(); +static __KEY: std::thread::__LocalKeyInner<Foo> = std::thread::__LocalKeyInner::new(); fn __getit(_: Option<&mut Option<RefCell<String>>>) -> std::option::Option<&'static Foo> { __KEY.get(Default::default) |
