about summary refs log tree commit diff
path: root/src/libstd/thread
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-09-03 20:10:42 +0000
committerbors <bors@rust-lang.org>2015-09-03 20:10:42 +0000
commit1b908be9a0d7aaf8f18854db1ffef7b8df10dfeb (patch)
tree506e5b6cd2f56abd94c525bfbb34240e1466ed47 /src/libstd/thread
parent0762f58c1143b4ff0ae5d0cdda9cdd8249512e77 (diff)
parente6e175b828a86defa5637cdc5980ba94fbddf449 (diff)
downloadrust-1b908be9a0d7aaf8f18854db1ffef7b8df10dfeb.tar.gz
rust-1b908be9a0d7aaf8f18854db1ffef7b8df10dfeb.zip
Auto merge of #28200 - Manishearth:rollup, r=Manishearth
- Successful merges: #28164, #28170, #28184, #28186, #28187, #28188, #28191, #28193, #28194, #28195
- Failed merges: 
Diffstat (limited to 'src/libstd/thread')
-rw-r--r--src/libstd/thread/scoped_tls.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/thread/scoped_tls.rs b/src/libstd/thread/scoped_tls.rs
index bfcaabdbc17..87f58b4c849 100644
--- a/src/libstd/thread/scoped_tls.rs
+++ b/src/libstd/thread/scoped_tls.rs
@@ -226,6 +226,7 @@ impl<T> ScopedKey<T> {
 #[doc(hidden)]
 mod imp {
     use cell::Cell;
+    use ptr;
 
     pub struct KeyInner<T> { inner: Cell<*mut T> }
 
@@ -233,7 +234,7 @@ mod imp {
 
     impl<T> KeyInner<T> {
         pub const fn new() -> KeyInner<T> {
-            KeyInner { inner: Cell::new(0 as *mut _) }
+            KeyInner { inner: Cell::new(ptr::null_mut()) }
         }
         pub unsafe fn set(&self, ptr: *mut T) { self.inner.set(ptr); }
         pub unsafe fn get(&self) -> *mut T { self.inner.get() }