diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-02-03 12:55:00 +0100 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-02-11 15:08:16 +0100 |
| commit | d3c212c5527f901fcb44d59d031695248762c340 (patch) | |
| tree | 517e224748ab0be13ec54bc99b5f728263152328 /src/libstd/thread | |
| parent | 57d7cfc3cf50f0c427ad3043ff09eaef20671320 (diff) | |
| download | rust-d3c212c5527f901fcb44d59d031695248762c340.tar.gz rust-d3c212c5527f901fcb44d59d031695248762c340.zip | |
Require a list of features to allow in `allow_internal_unstable`
Diffstat (limited to 'src/libstd/thread')
| -rw-r--r-- | src/libstd/thread/local.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs index 5d2eb5f8e73..8207709e1f9 100644 --- a/src/libstd/thread/local.rs +++ b/src/libstd/thread/local.rs @@ -126,7 +126,8 @@ impl<T: 'static> fmt::Debug for LocalKey<T> { /// [`std::thread::LocalKey`]: ../std/thread/struct.LocalKey.html #[macro_export] #[stable(feature = "rust1", since = "1.0.0")] -#[allow_internal_unstable] +#[cfg_attr(stage0, allow_internal_unstable)] +#[cfg_attr(not(stage0), allow_internal_unstable(thread_local_internals))] macro_rules! thread_local { // empty (base case for the recursion) () => {}; @@ -148,7 +149,10 @@ macro_rules! thread_local { reason = "should not be necessary", issue = "0")] #[macro_export] -#[allow_internal_unstable] +#[cfg_attr(stage0, allow_internal_unstable)] +#[cfg_attr(not(stage0), allow_internal_unstable( + thread_local_internals, cfg_target_thread_local, thread_local, +))] #[allow_internal_unsafe] macro_rules! __thread_local_inner { (@key $(#[$attr:meta])* $vis:vis $name:ident, $t:ty, $init:expr) => { |
