about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-23 15:09:09 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-23 15:09:09 -0700
commit2153c581ef66de1537286b58b1b323d24c25d07f (patch)
tree1ec75f5284c1641e854dbd7d0d4ca5c58a61e907 /src/libstd/sys
parentb97e1cc28e0d3fe6a745a02a7c1750564a090f34 (diff)
parent6bd3ab0d8140053475a901ad4e2e80e98955bcb0 (diff)
downloadrust-2153c581ef66de1537286b58b1b323d24c25d07f.tar.gz
rust-2153c581ef66de1537286b58b1b323d24c25d07f.zip
rollup merge of #23557: aturon/rfc-909
This commit implements [RFC 909](https://github.com/rust-lang/rfcs/pull/909):

The `std::thread_local` module is now deprecated, and its contents are
available directly in `std::thread` as `LocalKey`, `LocalKeyState`, and
`ScopedKey`.

The macros remain exactly as they were, which means little if any code
should break. Nevertheless, this is technically a:

[breaking-change]

Closes #23547
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/common/thread_info.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/common/thread_info.rs b/src/libstd/sys/common/thread_info.rs
index e4985e703ba..90526b8f4f3 100644
--- a/src/libstd/sys/common/thread_info.rs
+++ b/src/libstd/sys/common/thread_info.rs
@@ -15,7 +15,7 @@ use core::prelude::*;
 use cell::RefCell;
 use string::String;
 use thread::Thread;
-use thread_local::State;
+use thread::LocalKeyState;
 
 struct ThreadInfo {
     stack_guard: uint,
@@ -26,7 +26,7 @@ thread_local! { static THREAD_INFO: RefCell<Option<ThreadInfo>> = RefCell::new(N
 
 impl ThreadInfo {
     fn with<R, F>(f: F) -> R where F: FnOnce(&mut ThreadInfo) -> R {
-        if THREAD_INFO.state() == State::Destroyed {
+        if THREAD_INFO.state() == LocalKeyState::Destroyed {
             panic!("Use of std::thread::current() is not possible after \
                     the thread's local data has been destroyed");
         }