grandfathered -> rust1
This commit is contained in:
parent
b7fe2c54b7
commit
b44ee371b8
102 changed files with 1490 additions and 1490 deletions
|
|
@ -34,7 +34,7 @@
|
|||
//! will want to make use of some form of **interior mutability** through the
|
||||
//! `Cell` or `RefCell` types.
|
||||
|
||||
#![stable(feature = "grandfathered", since = "1.0.0")]
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
use prelude::v1::*;
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ pub mod __impl {
|
|||
/// assert_eq!(*f.borrow(), 2);
|
||||
/// });
|
||||
/// ```
|
||||
#[stable(feature = "grandfathered", since = "1.0.0")]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct Key<T> {
|
||||
// The key itself may be tagged with #[thread_local], and this `Key` is
|
||||
// stored as a `static`, and it's not valid for a static to reference the
|
||||
|
|
@ -113,7 +113,7 @@ pub struct Key<T> {
|
|||
|
||||
/// Declare a new thread local storage key of type `std::thread_local::Key`.
|
||||
#[macro_export]
|
||||
#[stable(feature = "grandfathered", since = "1.0.0")]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
macro_rules! thread_local {
|
||||
(static $name:ident: $t:ty = $init:expr) => (
|
||||
static $name: ::std::thread_local::Key<$t> = {
|
||||
|
|
@ -259,7 +259,7 @@ impl<T: 'static> Key<T> {
|
|||
/// This function will `panic!()` if the key currently has its
|
||||
/// destructor running, and it **may** panic if the destructor has
|
||||
/// previously been run for this thread.
|
||||
#[stable(feature = "grandfathered", since = "1.0.0")]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub fn with<F, R>(&'static self, f: F) -> R
|
||||
where F: FnOnce(&T) -> R {
|
||||
let slot = (self.inner)();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue