This website requires JavaScript.
Explore
Help
Sign in
mathieu
/
granite-rust
Watch
1
Star
0
Fork
You've already forked granite-rust
0
Code
Issues
Pull requests
Projects
Releases
Packages
Wiki
Activity
33b0e4be06
granite-rust
/
tests
/
ui
/
hygiene
/
thread-local-not-in-prelude.rs
10 lines
100 B
Rust
Raw
Normal View
History
Unescape
Escape
tests: Add missing run-pass annotations
2019-07-27 00:54:25 +03:00
// run-pass
std: Enable usage of `thread_local!` through imports The `thread_local!` macro delegated to an internal macro but it didn't do so in a macros-and-the-module-system compatible fashion, meaning if a `#![no_std]` crate imported `std` and tried to use `thread_local!` it would fail due to missing a lookup of an internal macro. This commit switches the macro to instead use `$crate` to invoke other macros, ensuring that it'll work when `thread_local!` is imported alone.
2018-11-01 14:17:39 -07:00
#![
no_std
]
extern
crate
std
;
std
::
thread_local!
(
static
A
:
usize
=
30
)
;
fn
main
(
)
{
}
Reference in a new issue
Copy permalink