about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-07-17 09:32:08 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-07-25 07:03:19 -0700
commit9010567dcc0aba772525841aee67c030ea3450c6 (patch)
tree26b11fb6639fcde4477f8f0db8f04af1b5984a7c /src/libstd
parent7c46c6c59dbee8d6385f8924fe27cc5a7893841f (diff)
Bump master to 1.21.0
This commit bumps the master branch's version to 1.21.0 and also updates the
bootstrap compiler from the freshly minted beta release.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/heap.rs3
-rw-r--r--src/libstd/lib.rs3
-rw-r--r--src/libstd/thread/local.rs67
3 files changed, 2 insertions, 71 deletions
diff --git a/src/libstd/heap.rs b/src/libstd/heap.rs
index 83bd3b04b4d..d76ab31862b 100644
--- a/src/libstd/heap.rs
+++ b/src/libstd/heap.rs
@@ -13,10 +13,9 @@
 #![unstable(issue = "32838", feature = "allocator_api")]
 
 pub use alloc::heap::{Heap, Alloc, Layout, Excess, CannotReallocInPlace, AllocErr};
-#[cfg(not(stage0))]
 pub use alloc_system::System;
 
-#[cfg(all(not(stage0), not(test)))]
+#[cfg(not(test))]
 #[doc(hidden)]
 pub mod __default_lib_allocator {
     use super::{System, Layout, Alloc, AllocErr};
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index a012f2f42c1..7584d753240 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -318,8 +318,7 @@
 #![feature(vec_push_all)]
 #![cfg_attr(test, feature(update_panic_count))]
 
-#![cfg_attr(not(stage0), default_lib_allocator)]
-#![cfg_attr(stage0, feature(associated_consts))]
+#![default_lib_allocator]
 
 // Explicitly import the prelude. The compiler uses this same unstable attribute
 // to import the prelude implicitly when building crates that depend on std.
diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs
index be433e2b81e..0172f89e05b 100644
--- a/src/libstd/thread/local.rs
+++ b/src/libstd/thread/local.rs
@@ -110,7 +110,6 @@ impl<T: 'static> fmt::Debug for LocalKey<T> {
     }
 }
 
-#[cfg(not(stage0))]
 /// Declare a new thread local storage key of type [`std::thread::LocalKey`].
 ///
 /// # Syntax
@@ -152,7 +151,6 @@ macro_rules! thread_local {
     );
 }
 
-#[cfg(not(stage0))]
 #[doc(hidden)]
 #[unstable(feature = "thread_local_internals",
            reason = "should not be necessary",
@@ -185,71 +183,6 @@ macro_rules! __thread_local_inner {
     }
 }
 
-#[cfg(stage0)]
-/// Declare a new thread local storage key of type `std::thread::LocalKey`.
-#[macro_export]
-#[stable(feature = "rust1", since = "1.0.0")]
-#[allow_internal_unstable]
-macro_rules! thread_local {
-    // rule 0: empty (base case for the recursion)
-    () => {};
-
-    // rule 1: process multiple declarations where the first one is private
-    ($(#[$attr:meta])* static $name:ident: $t:ty = $init:expr; $($rest:tt)*) => (
-        thread_local!($(#[$attr])* static $name: $t = $init); // go to rule 2
-        thread_local!($($rest)*);
-    );
-
-    // rule 2: handle a single private declaration
-    ($(#[$attr:meta])* static $name:ident: $t:ty = $init:expr) => (
-        $(#[$attr])* static $name: $crate::thread::LocalKey<$t> =
-            __thread_local_inner!($t, $init);
-    );
-
-    // rule 3: handle multiple declarations where the first one is public
-    ($(#[$attr:meta])* pub static $name:ident: $t:ty = $init:expr; $($rest:tt)*) => (
-        thread_local!($(#[$attr])* pub static $name: $t = $init); // go to rule 4
-        thread_local!($($rest)*);
-    );
-
-    // rule 4: handle a single public declaration
-    ($(#[$attr:meta])* pub static $name:ident: $t:ty = $init:expr) => (
-        $(#[$attr])* pub static $name: $crate::thread::LocalKey<$t> =
-            __thread_local_inner!($t, $init);
-    );
-}
-
-#[cfg(stage0)]
-#[doc(hidden)]
-#[unstable(feature = "thread_local_internals",
-           reason = "should not be necessary",
-           issue = "0")]
-#[macro_export]
-#[allow_internal_unstable]
-macro_rules! __thread_local_inner {
-    ($t:ty, $init:expr) => {{
-        fn __init() -> $t { $init }
-
-        fn __getit() -> $crate::option::Option<
-            &'static $crate::cell::UnsafeCell<
-                $crate::option::Option<$t>>>
-        {
-            #[thread_local]
-            #[cfg(target_thread_local)]
-            static __KEY: $crate::thread::__FastLocalKeyInner<$t> =
-                $crate::thread::__FastLocalKeyInner::new();
-
-            #[cfg(not(target_thread_local))]
-            static __KEY: $crate::thread::__OsLocalKeyInner<$t> =
-                $crate::thread::__OsLocalKeyInner::new();
-
-            __KEY.get()
-        }
-
-        $crate::thread::LocalKey::new(__getit, __init)
-    }}
-}
-
 /// Indicator of the state of a thread local storage key.
 #[unstable(feature = "thread_local_state",
            reason = "state querying was recently added",