Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
254bf6027d83a94e93b5112d558c81a3e050413f
rust/tests/codegen/auxiliary/thread_local_aux.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

6 lines
111 B
Rust
Raw Normal View History

std: Attempt again to inline thread-local-init across crates Issue #25088 has been part of `thread_local!` for quite some time now. Historical attempts have been made to add `#[inline]` to `__getit` in #43931, #50252, and #59720, but these attempts ended up not landing at the time due to segfaults on Windows. In the interim though with `const`-initialized thread locals AFAIK this is the only remaining bug which is why you might want to use `#[thread_local]` over `thread_local!`. As a result I figured it was time to resubmit this and see how it fares on CI and if I can help debugging any issues that crop up. Closes #25088
2021-05-03 11:39:10 -07:00
#![crate_type = "lib"]
use std::cell::Cell;
thread_local!(pub static A: Cell<u64> = const { Cell::new(0) });
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 435ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API