You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use std::cell::Cell;thread_local!{pubstaticFOO: Cell<u32> = const{Cell::new(0)};
}
loom::thread_local does not:
error: no rules expected the token `const`
--> src/test.rs:3:33
|
3 | pub static FOO: Cell<u32> = const { Cell::new(0) };
| ^^^^^ no rules expected this token in macro call
The text was updated successfully, but these errors were encountered:
anko
changed the title
loom::lazy_static does not support const-initialised thread localsloom::thread_local does not support const-initialization
Apr 20, 2024
std::thread_local
accepts this:loom::thread_local
does not:The text was updated successfully, but these errors were encountered: